[Webkit-unassigned] [Bug 33962] New: 'blur' event fired while modal dialog box is up

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 21 11:39:45 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=33962

           Summary: 'blur' event fired while modal dialog box is up
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jamesr at chromium.org


WebKit fires the 'blur' event, and runs associated handlers, while modal dialog
boxes (like window.confirm() and window.alert()) are up.  This breaks
assumptions in the page and in WebKit.

Test page:
http://livedom.validator.nu/?<!DOCTYPE%20html>%0A<div%20id%3D'log'></div>%0A<input%20type%3D'text'%20id%3D'foo'>lalala</input>%0A<script>%0Afunction%20$(s)%20{return%20document.getElementById(s);}%0Afunction%20l(s)%20{%20$('log').innerHTML%20%2B%3D%20"<br>"%20%2B%20s;%20}%0A%0A$('foo').onmouseup%20%3D%20function()%20{%0A%20%20l('mouseup,%20about%20to%20confirm');%0A%20%20window.confirm("hi");%0A%20%20l('mouseup,%20did%20confirm');%0A}%0A$('foo').onblur%20%3D%20function()%20{%0A%20%20l('blur');%0A%20%20window.setTimeout(function()%20{l('timer%20fired');},%205000);%0A};%0A</script>

On WebKit ToT, clicking inside the input area (and leaving the dialog up for >5
seconds) causes the following output:
mouseup, about to confirm
blur
timer fired
mouseup, did confirm
blur
timer fired

In debug mode, if the dialog is dismissed in less than 5 seconds WebKit crashes
with this assertion:
ASSERTION FAILED: m_suspended
(/usr/local/home/jamesr/WebKit/WebCore/page/DOMTimer.cpp:192 virtual void
WebCore::DOMTimer::resume())

The reason is that the PageGroupLoadDeferrer suspends all active DOM objects
when the modal dialog box is posted.  When the dialog is dismissed, it iterates
over all active DOM objects and tries to resume them.  However, since the
onblur handler fired while the dialog was up and set a new timer, it is not
suspended when the resume() call is made.

Safari 4.0.4 doesn't fire the blur event at all while the modal dialog box is
up.  On windows once the dialog box is dismissed the input area does not seem
focused (it doesn't have a focus ring or a blinking cursor), but clicking
outside of it does fire a blur event.  On OS X the dialog has a focus ring and
blinking cursor after the dialog is dimissed.

Firefox 3.5.7 fires the blur handler while the dialog is up, but it doesn't run
the body of the setTimeout() until the dialog box is dismissed regardless of
how long the dialog is up.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list