GithubHelp home page GithubHelp logo

Comments (5)

qidizi avatar qidizi commented on May 21, 2024

a.com使用iframe包含了b.com.在b.com中使用这个js,那么在ie下面
document.activeElement属性将会导致无权访问而出错,整个js不能初始化.
临时使用try catch处理

from artdialog.

aui avatar aui commented on May 21, 2024

请问你的artDialog版本号是?IE版本是?

from artdialog.

qidizi avatar qidizi commented on May 21, 2024

ie10正常模式测试.
个人认为是焦点首先在top页面,获取时会无权限.
某人的解决方案是,先让本iframe:document.documentElement.focus();再取,只不过,看功能.
直接try catch,出错就不需要进行这步,毕竟重新的focus也是没必要了.
http://stackoverflow.com/questions/14378224/document-activeelement-in-iframe-shows-unspecified-error-in-ie-standards-mode

  • artDialog 5.0.3

from artdialog.

quanz avatar quanz commented on May 21, 2024

我是ie8 + artDialog 5.0.4运行上面的例子出错,在ie8以上就没问题,跟了一下发现是后弹出的窗口关闭时试图恢复焦点,可 _activeElement却落在了前一个窗口的Save按钮上,而ajax操作是异步的,前一个窗口在后弹出的窗口关闭时应已经关闭了,有可能就因此出错了
看代码本身的注释是说这段代码用于“恢复焦点,照顾键盘操作的用户”,我现在的临时解决就是按qidizi所说
try catch不让出错,但没想清楚是否合适

from artdialog.

aui avatar aui commented on May 21, 2024

已经修复

from artdialog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.