[Webkit-unassigned] [Bug 12469] window.alert from onUnload listener does not show when users close the window
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 26 09:29:03 PST 2008
http://bugs.webkit.org/show_bug.cgi?id=12469
julien.chaffraix at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|Major |Normal
Summary|onUnload event does not fire|window.alert from onUnload
|when user close window |listener does not show when
| |users close the window
------- Comment #4 from julien.chaffraix at gmail.com 2008-02-26 09:29 PDT -------
(In reply to comment #3)
> In my testing, -[WebView setUIDelegate:] is called from WebKit itself:
>
> #0 -[WebView setUIDelegate:] (self=0x37ed4c0, _cmd=0x3e1ab6, delegate=0x0) at
> /Users/ap/Safari/OpenSource/WebKit/mac/WebView/WebView.mm:2091
> #1 0x003949e6 in -[WebView(WebPrivate) _close] (self=0x37ed4c0,
> _cmd=0x926aa890) at
> /Users/ap/Safari/OpenSource/WebKit/mac/WebView/WebView.mm:703
> ...
>
Odd, I have another call to setUIDelegate before the one you mention on my
machine which originate from Cocoa :
#0 -[WebView setUIDelegate:] (self=0x2554c10, _cmd=0x3e13f8, delegate=0x0) at
/Users/julien/Webkit/WebKit/WebKit/mac/WebView/WebView.mm:2093
#1 0x00049d21 in ?? ()
#2 0x925f3059 in -[NSArray makeObjectsPerformSelector:withObject:] ()
#3 0x925f3059 in -[NSArray makeObjectsPerformSelector:withObject:] ()
#4 0x92603d2d in -[NSArray makeObjectsPerformSelector:] ()
(...)
Beside the one you are pointing at is executed after the unload listener : in
WebView _close, the unload event is dispatched in
mainLoader->detachFromParent() and setUIDelegate is called afterwards.
> I'm not sure why this is classified as a major bug - what kind of important
> consequences does it have? Does showing an alert from onunload serve any
> purpose except for annoying the user?
>
Updated the summary and the severity as the original bug was that we were not
dispatching an unload event when closing the window (which is major).
I agree with you about how annoying alert from onunload listener can be but
Firefox and Opera have chosen to display those so it is believed we should do
the same.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list