【问题标题】:Invalid argument JavaScript exception in IE 8 issue with ExtJS in moveItem functionIE 8 中的无效参数 JavaScript 异常与 moveItem 函数中的 ExtJS 问题
【发布时间】:2014-04-20 00:13:27
【问题描述】:

下面是文件 ext-all-dev.js 中的代码 sn-p。下面的 JavaScript 异常仅在 Internet Explorer 8 (IE) 中发生。我没有尝试过任何其他版本的 Internet Explorer。当我在运行我的应用程序时在这行代码上放置一个断点时,浏览器在 IE 中冻结。所以我没有办法在 IE 中解决这个问题。有没有一种简单的方法可以判断哪些代码可能正在调用此行?我感觉某些拖放功能可能会导致这种情况(因为函数注释),但这是一个猜测。我现在唯一的选择是使用 Google Chrome 或 Mozilla Firefox 开始向后追溯。除非您知道可能导致此问题的原因,否则我只是在寻找有关故障排除的建议。

/**
 * Moves Component to the provided target instead.
 * @private
 */
moveItem : function(item, target, position) {
        target = target.dom || target;
        if (typeof position == 'number') {
            position = target.childNodes[position];
        }
        target.insertBefore(item.el.dom, position || null);  // line 51942
        item.container = Ext.get(target);
        this.configureItem(item);
    },

例外:

Invalid argument.
ext-all-dev.js line 51942 character 9

【问题讨论】:

  • 尝试添加console.log(item +'/'+target+'/'+position);进入 moveItem 函数并在此处显示结果。
  • 日志:[object Object]/[object HTMLBodyElement]/[object HTMLDivElement]

标签: javascript internet-explorer exception extjs4 invalid-argument


【解决方案1】:

将树拖放插件完全限定的类名放入所需配置中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-03-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-11
    • 1970-01-01
    相关资源
    最近更新 更多