Bug Tracker

Opened 11 years ago

Closed 11 years ago

#11936 closed bug (cantfix)

$(window).one("click", ....) does not work in IE7

Reported by: Philipp Klose <[email protected]…> Owned by: Philipp Klose <[email protected]…>
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


$(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 Rick Waldron

Owner: set to Philipp Klose <[email protected]…>
Status: newpending

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.

comment:2 Changed 11 years ago by Philipp Klose <[email protected]…>

Status: pendingnew

Bug still exists in jQuery (edge).

Example: http://jsfiddle.net/WtT3L/2/ (requires IE7 for testing ;-)

comment:3 Changed 11 years ago by dmethvin

Resolution: cantfix
Status: newclosed

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.

Note: See TracTickets for help on using tickets.