Opened 11 years ago
Closed 11 years ago
#11936 closed bug (cantfix)
$(window).one("click", ....) does not work in IE7
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$(window).one("click", ....) does not work in IE7 but work in all other browsers I tested.
I would be nice if this could unified by either disabling this on all other browser or using a workaround on IE7. (E.g.: $('body').one('click', ...) does work.
Change History (3)
comment:1 Changed 11 years ago by
Owner: | set to Philipp Klose <[email protected]…> |
---|---|
Status: | new → pending |
comment:2 Changed 11 years ago by
Status: | pending → new |
---|
Bug still exists in jQuery (edge).
Example: http://jsfiddle.net/WtT3L/2/ (requires IE7 for testing ;-)
comment:3 Changed 11 years ago by
Resolution: | → cantfix |
---|---|
Status: | new → closed |
The browsers are all doing the correct thing for their era. DOM2 Events said that events did not have to bubble to window
but DOM3 Events says they do. A .trigger()
ed event bubbles in all browsers, but that's because we do the bubbling ourselves.
There's no reason to listen for bubbling native events on window
, use document
instead since that works on all browsers regardless of their vintage.
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!
Additionally, be sure to test against the "jQuery (edge)" version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to begin.