Open Bug 1272510 Opened 5 years ago Updated 2 years ago

Firefox triggers blur event after focusing window


(Core :: DOM: Events, defect)

46 Branch
Not set





(Reporter: bartoszpop, Unassigned)



(Whiteboard: btpp-followup-2016-05-27)


(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36

Steps to reproduce:

I have a problem with focusing the previously opened window in the Firefox browser. In the first step I append a clickable span element with a 'onmousedown' handler which opens a new window if the element is clicked.

Actual results:

A newly created window is focused correctly but after focusing the main window and clicking the span element again the previously created window is being focused and immediately blured.

Expected results:

The blur event shouldn't occur.
Duplicate of this bug: 1272511
Component: Untriaged → DOM: Events
Product: Firefox → Core
qDot, wanna take a quick look here? (yes, not your usual wheelhouse)
Flags: needinfo?(kyle)
Whiteboard: btpp-followup-2016-05-27
So, testing this on Nightly 50.0a1 2016-06-14 on Mac OS X, I'm getting odd behavior that doesn't match the STR but still isn't right. Using the jsfiddle link in Comment #0, if I click on the Click Here link, the new window is opened but not focused. Clicking on/off the new window triggers focus/blur events as expected. However, clicking the "Click here" span again in the jsfiddle after that does nothing. I'd expect that it should still be focusing the new window?
Assignee: nobody → kyle
Flags: needinfo?(kyle)
Recently I made a little change (removed <br> tag) in the jsfiddle that changed the behaviour - see for the origin source.
Jessica, as you worked recently on the "blur" event, could you check this bug report if you have some time, please.
Flags: needinfo?(jjong)
I am getting similar behavior to comment 3, except that on the first time I click on the span, the new window is opened and focused ("openewWindow.focus()" is logged). After that, clicking on the span again does nothing.

I can take a look at it, but it may take some more time, as I am not really familiar with this part of the code.
Attached file test-bug-1272150.html
It turns out that clicking on the span did nothing was a jsfiddle thing, when testing using the attached page, I can reproduce the bug on OSX but not on Linux.

What is more, the issue is not found on Nightly (e10s) but is found on Nightly (non-e10s). So I am not sure whether I should keep digging in or not, since non-e10s bugs are not in our priority list.
Flags: needinfo?(jjong)
It would be nice if non-e10s and e10s lined up here but given the pending release of e10s it's probably not the end of the world if this is only correct in e10s mode.
Assignee: kyle → nobody
You need to log in before you can comment on or make changes to this bug.