Skip to main content

Bug Tracker

Side navigation

#11936 closed bug (cantfix)

Opened June 19, 2012 08:41PM UTC

Closed June 19, 2012 09:22PM UTC

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

Reported by: Philipp Klose <me@thehippo.de> Owned by: Philipp Klose <me@thehippo.de>
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.

Attachments (0)
Change History (3)

Changed June 19, 2012 08:49PM UTC by rwaldron comment:1

owner: → Philipp Klose <me@thehippo.de>
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.

Changed June 19, 2012 08:58PM UTC by Philipp Klose <me@thehippo.de> comment:2

status: pendingnew

Bug still exists in jQuery (edge).

Example: http://jsfiddle.net/WtT3L/2/

(requires IE7 for testing ;-)

Changed June 19, 2012 09:22PM UTC by dmethvin comment:3

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.