[1.9] Fixes #12061 #894

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Member

markelog commented Aug 14, 2012

This was fixed a long time ago

Owner

dmethvin commented Aug 20, 2012

I love the use of the postDispatch hook! How is this providing support for IE6 though?

Member

markelog commented Aug 28, 2012

In IE6 this will not work –
[iframe doc].onbeforeunload = [ some function ]

but this will –
[iframe doc].attachEvent( "onbeforeunload", [ some function ] );

In this test, i wanted to check if user function attached through window object will not clobber jQuery beforeunload event, but i can't do that in IE6.

dmethvin closed this in 9dd0b01 Oct 21, 2012

Owner

dmethvin commented Oct 21, 2012

@Orkel, looks like a legit failure in Safari 5.0? I was able to reproduce on BrowserStack. Perhaps Safari 5.0 requires window.onbeforeunload? http://swarm.jquery.org/result/359338

Owner

scottgonzalez commented Oct 21, 2012

If we can fix Safari 5.0, we probably should, but it's not on the supported browser list. We should really update TestSwarm.

Owner

dmethvin commented Oct 21, 2012

There must be some mobile devices on Safari 5.0 still? If not, great, Or if it's a small number we could document that this one thing doesn't work on them.

Member

markelog commented Oct 21, 2012

Beforeunload event does not work on iframes in IE6 if event handler was defined through window object, but it will work, if this event was binded though attachEvent.

In old Safari this event will not work on iframes regardless how it was binded, but it will work on parent window. So this test will fail with new or with old code in old Safari.

How want to do this? I could replace this test on synthetic one or leave it be?

Owner

dmethvin commented Oct 21, 2012

Okay, so this only affects iframes, and only in Safari 5.0. We just need to avoid getting a unit test failure, can you do a patch for that?

Member

markelog commented Oct 21, 2012

there you go – #1002

@mescoda mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014

@markelog @dmethvin markelog + dmethvin Fix #12061. Avoid window.onbeforeunload to permit multiple handlers. …
…Close gh-894.
033eeda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment