Why event.bubbles is false for “focusin” and “focusout”?

左心房为你撑大大i 提交于 2019-12-05 02:43:04

Sounds like a bug in jQuery. Did you test this on a browser that supports focusin and focusout natively? (E.g., IE?) Because if not, you're testing the flag for jQuery's emulated support.

I've crossed out the "Sounds like a bug" bit above because jQuery doesn't claim to normalize the bubbles property in the documentation. So since it doesn't guarantee it, it doesn't have to support it on emulated events. (Note that if I run your demo on IE7, I get undefined because IE7 doesn't support the DOM3 Events bubbles property.) Still an issue, but perhaps not a bug. :-)


Update:

Response on the jQuery ticket:

The documentation doesn't claim to normalize the event.bubbles property. You can look for it in event.originalEvent but that will be whatever the platform provided, unnormalized.

So my guess above was correct. It's not a bug, because they don't claim to normalize that. :-)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!