Closed
Bug 457672
Opened 14 years ago
Closed 14 years ago
window blur event is not fired when opening a new tab
Categories
(Core :: DOM: Events, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla1.9.1b3
People
(Reporter: michael.tamm2, Assigned: smaug)
References
()
Details
(Keywords: regression, verified1.9.1)
Attachments
(3 files, 1 obsolete file)
449 bytes,
text/html
|
Details | |
3.58 KB,
patch
|
Details | Diff | Splinter Review | |
6.06 KB,
patch
|
jst
:
review+
jst
:
superreview+
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 The window blur event is not fired, when a new tab is opened (and sometimes - not always - also when you switch to another tab). This behavior can be verified with the provided test page at http://www.michaeltamm.de/window_blur_test.html The blur event will be fired, if another window is focused. Reproducible: Always Steps to Reproduce: 1. Go to http://www.michaeltamm.de/window_blur_test.html 2. Open a new tab. 3. Switch back to the tab displaying http://www.michaeltamm.de/window_blur_test.html Actual Results: There is no paragraph with the text 'lost focus at ...' Expected Results: The page should have two more paragraphs (added via JavaScript): 'lost focus at ...' followed by 'got focus at ...'
Comment 1•14 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1pre) Gecko/20080928084201 Minefield/3.1b1pre Confirmed with latest trunk on Windows XP.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: unspecified → Trunk
Comment 2•14 years ago
|
||
This regressed on 3 July 2007 probably from Bug 238987.
Blocks: 238987
Component: Tabbed Browser → DOM: Events
Keywords: regression
Product: Firefox → Core
QA Contact: tabbed.browser → events
Updated•14 years ago
|
Flags: blocking1.9.1?
Assignee | ||
Comment 3•14 years ago
|
||
Note, blur and focus don't bubble per DOM Events spec. Bug 238987 just revealed a bug that we don't always dispatch the blur event to |window|, only to |document|. But that bug was there already in 1.8 (FF2).
Assignee | ||
Comment 4•14 years ago
|
||
For some reason this wasn't implemented in bug 27936 (yes, that is ~8 years ago). http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/content/events/src/nsEventStateManager.cpp&rev=1.439&mark=436#416
Blocks: 27936
Assignee | ||
Comment 5•14 years ago
|
||
Changing focus/blur handling is always regression-risky. I think the patch does what I'd like to see happening, but something may rely on the old behavior. Needs lots of testing.
Assignee | ||
Comment 6•14 years ago
|
||
I still need to write testcases for this
Attachment #340957 -
Attachment is obsolete: true
Assignee | ||
Comment 7•14 years ago
|
||
Comment on attachment 340993 [details] [diff] [review] passes mochitest, chrome and browser-chrome Doesn't regress bug 200735, bug 203117, bug 194104 nor bug 201996. (bryner fixed those bugs when modifying this code.) Still need to write mochitests
Comment 8•14 years ago
|
||
Smaug, how risky do you think this is? Do you think you could get the tests written in time for 1.9.1? If so, it'd be awesome to get this in if we feel comfortable about this patch...
Assignee: nobody → Olli.Pettay
Flags: wanted1.9.1+
Flags: wanted1.9.0.x?
Flags: wanted-next+
Flags: blocking1.9.1?
Flags: blocking1.9.1-
Priority: -- → P1
Assignee | ||
Comment 9•14 years ago
|
||
Changing focus handling is always a bit risky. The current code is clearly wrong, there is even the XXX comment. I'll try to write the mochitest ASAP.
Assignee | ||
Updated•14 years ago
|
Attachment #340949 -
Attachment is patch: false
Attachment #340949 -
Attachment mime type: text/plain → text/html
Assignee | ||
Comment 10•14 years ago
|
||
Sorry, my asap wasn't really asap.
Attachment #350001 -
Flags: superreview?(jst)
Attachment #350001 -
Flags: review?(jst)
Comment 11•14 years ago
|
||
Comment on attachment 350001 [details] [diff] [review] with mochitesttest Looks good to me. r+sr=jst
Attachment #350001 -
Flags: superreview?(jst)
Attachment #350001 -
Flags: superreview+
Attachment #350001 -
Flags: review?(jst)
Attachment #350001 -
Flags: review+
Assignee | ||
Updated•14 years ago
|
Attachment #350001 -
Flags: approval1.9.1?
Assignee | ||
Comment 12•14 years ago
|
||
Comment on attachment 350001 [details] [diff] [review] with mochitesttest If we want this for 1.9.1, this should land asap to get testing.
Comment 13•14 years ago
|
||
Comment on attachment 350001 [details] [diff] [review] with mochitesttest a191=beltzner
Attachment #350001 -
Flags: approval1.9.1? → approval1.9.1+
Assignee | ||
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [needs-1.9.1-landing]
Assignee | ||
Comment 15•14 years ago
|
||
I disabled the test on 1.9.1 for now because SM is also running mochitest and the test relies on FF's new-window handling.
Comment 16•14 years ago
|
||
(In reply to comment #15) See bug 457672.
Comment 17•14 years ago
|
||
(In reply to comment #16) > See bug 457672. Argh: bug 468261 !
Comment 18•14 years ago
|
||
will look at a patch approval if you feel strongly about getting this into a 3.0.x release (and think the patch is safe enough), but not "wanted" in the sense of "release-drivers need to make sure this gets in sometime".
Flags: wanted1.9.0.x?
Comment 19•13 years ago
|
||
verified FIXED on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090331 Minefield/3.6a1pre and Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090401 Shiretoko/3.5b4pre
Status: RESOLVED → VERIFIED
Keywords: fixed1.9.1 → verified1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•