[Webkit-unassigned] [Bug 24219] New: window.onblur and onfocus events don't fire when switching tabs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 26 20:47:56 PST 2009


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

           Summary: window.onblur and onfocus events don't fire when
                    switching tabs
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh Intel
               URL: http://talkie.me/
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: blue at creativepony.com


Please note, entered as Nightly Build because Safari 4 Public Beta not
available on versions list. Issue affects Safari 4 Public Beta, untested on
nightlies.

While building a long polling chat application, I found myself needing to make
use of onblur and onfocus events on the DOMWindow object. I attached handlers
using the addEvent method provided by the Mootools framework, which makes use
of standard dom methods internally, not the onblur/focus properties themselves.

When moving focus away from the window, onblur correctly fires, but when
changing to another tab, it does not fire. I also observed that blur and focus
events do not fire on inputs within the page as you move away to another tab.
Finally, I observed repeatably that while on this other tab, if you finally
take focus away from the safari window, it still does not fire onblur. It
appears to only fire these events within the active tab when the whole window
looses or gains focus. This behavior is inconsistent with Firefox 3.0.6, which
treats switching to a new tab as though the 'tab's window' has lost focus and
fires these events how I expected. I haven't tested this in any other browsers
as of yet, but strongly feel the behavior of Safari 4 is incorrect.

I'd like to see it behave like firefox. Treat the tab as the window in this
metaphor.


-- 
Configure bugmail: https://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