【问题标题】:extjs modern NS_ERROR_NOT_AVAILABLE on dialog show()extjs 现代 NS_ERROR_NOT_AVAILABLE 对话框显示()
【发布时间】:2018-06-20 19:28:18
【问题描述】:

我在自定义 dialogdialog.show() 上的 firefox 60.0.2 上收到 NS_ERROR_NOT_AVAILABLE 异常。 调试后,我发现异常是在 ext-modern-all-debug.js: value = computedStyle.getPropertyValue(name);line 85351 上产生的,其中属性 name 是 @ 987654326@,在computedStyle内不可用。

[Exception... "Component is not available" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: debugger eval code :: <TOP_LEVEL> :: line 1" data: no]

对话框显示代码:

var thisObj = this;

        var wnd = Ext.create('myApp.view.desktop.something.CustomWindow',{

            onButtonSubmitClick: function(){
                thisObj.doSomething();
                this.close();
            }

        });

        wnd.show();

ExtJS 调试功能:

getCssStyleValue: function(name, value) {
    var testElement = this.getTestElement(),
        computedStyle = this.testElementComputedStyle,
        style = testElement.style;
    style.setProperty(name, value);
    if (Ext.browser.is.Firefox) {

        testElement.offsetHeight;
    }
    value = computedStyle.getPropertyValue(name);
    style.removeProperty(name);
    return value;
}

这个错误与this mozilla bug有关吗?

有什么解决方法吗?

【问题讨论】:

    标签: javascript firefox extjs dialog extjs6-modern


    【解决方案1】:

    我不知道具体原因,但动画会产生这个错误。在我将dialog 上的动画设置为:

    hideAnimation: null,
    maximizeAnimation: null,
    restoreAnimation: null,
    showAnimation: null
    

    一切正常。

    希望我的回答能帮助遇到同样问题的人。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-09-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多