【发布时间】:2015-08-08 23:03:27
【问题描述】:
我正在开发一个使用 textAngular 的 Angular 应用程序,它依赖于 rangy-core 和 rangy-selectionsaverestore。我在使用最新的 IE 时遇到以下错误:
Module 'WrappedSelection' failed to load: Unspecified error.
Error: Unspecified error.
at Anonymous function (js/plugins/textAngular/rangy-core.js:2970:29)
at Anonymous function (js/plugins/textAngular/rangy-core.js:2923:14)
at Anonymous function (js/plugins/textAngular/rangy-core.js:415:21)
at Module.prototype.init (js/plugins/textAngular/rangy-core.js:387:13)
at init (js/plugins/textAngular/rangy-core.js:294:17)
at loadHandler (js/plugins/textAngular/rangy-core.js:3825:17)
Module 'SaveRestore' failed to load: Unable to get property 'isDirectionBackward' of undefined or null reference
TypeError: Unable to get property 'isDirectionBackward' of undefined or null reference
at Anonymous function (js/plugins/textAngular/rangy-selectionsaverestore.js:30:9)
at Anonymous function (js/plugins/textAngular/rangy-core.js:415:21)
at Module.prototype.init (js/plugins/textAngular/rangy-core.js:387:13)
at init (js/plugins/textAngular/rangy-core.js:294:17)
at loadHandler (js/plugins/textAngular/rangy-core.js:3825:17)
这个错误似乎发生在远程初始化期间。
奇怪的是,TextAngular 演示在 Internet Explorer 上运行良好。演示和我的应用程序之间的一个不同之处在于我使用的是未缩小的 rangy 库。最后,这些错误不会在 Chrome 或 Firefox 上发生。
虽然应用程序加载(我认为上面的错误只是控制台中的警告),但当我点击 textAngular 字段时,我看到以下错误:
对象不支持属性或方法“getSelection” 文件:textAngular.js,行:693,列:4
我在 textAngular 或 rangy github 中找不到解决这些问题的任何内容。有没有人遇到过这些问题?
如果有帮助,我可以将链接发布到我们的应用程序。
谢谢!
【问题讨论】:
-
我以前没有见过这个问题,但是查看 Rangy 代码我可以看到一个错误:选择保存/恢复模块缺少依赖项。我已经解决了这个问题,并将在下周左右发布错误修复版本。
-
感谢您的回复。您是否认为缺少的依赖导致脚本在 IE 中失败,而不是其他浏览器?
-
@TimDown,我注意到了提交并相应地更新了我的文件。现在,我只在 IE 中得到这个错误:
Module 'WrappedSelection' failed to load: Unspecified error. -
我也面临同样的问题。
-
我能够通过检查脚本的加载顺序来解决我的问题...查看示例并确保您的脚本以准确的顺序加载。
标签: javascript angularjs internet-explorer rangy textangular