Open Bug 837069 Opened 11 years ago Updated 2 years ago

Regression oberved during mousedown / focus events

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

19 Branch
x86_64
Windows 7
defect

Tracking

()

Tracking Status
firefox18 --- affected
firefox19 - wontfix
firefox20 - affected
firefox21 - affected

People

(Reporter: nicolas.hermestroff, Assigned: smaug)

References

()

Details

(Keywords: regression, testcase)

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20130131 Firefox/20.0
Build ID: 20130131042017

Steps to reproduce:

I use a webapp on our local net. It is a licensed application and quite heavy in jsp / obect programming.

When I click on a link (which is an object cretaed in memory by javascript), it should popup a search page. It is triggered by a onmousedown event which call a click() function.


Actual results:

The popup is displayed. But with two behaviour :
- If the (left) mouse button is released quickly, the popup get the focus
- If the (left) mouse button is released slowly or kept down, the popup get the focus and immediately go behind the main Window (have the cursor in the new displayed popup or outside doesn't affect)


Expected results:

In both case the popup should have been displayed and the focus kept. Well, that was the behaviour in our old Firefox 9.0. Using mozregression I narrowed the problem until :

Last good nightly: 2012-10-11
First bad nightly: 2012-10-12

Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=99898ec9976a&tochange=1301a72b1c39
Thanks for the regression range but we still need a testcase because a developer still doesn't know what exactly isn't working.
There is also nothing obvious in the regression range..
Flags: needinfo?(nicolas.hermestroff)
Ok, I finally managed to have a (completely broken) extract of the jsp pages but it shows my problem. Extract the zip (with subfolders) and look for emxNavigator.html. You'll see my tries and (after the HR) the part of my application.

TEST 1
-> quick click & long click wait for mouse release in order to show popup
=> No regression

Test Click
-> the same using some javascript
=> No regression

Test Mousedown
-> reproduce the effect of my problem but is not a bug : a quick click let the new window have the focus, long click doesn't give the focus to the new Window 
=> No regression (and no bug I suppose)

Test No Bug
-> the same as the previous one but I use the function of my JSP app to open the popup
=> No regression (and no bug I suppose)

After HR
-> If you click on the double missing images, a menu open, choose last option and click on the last submenu option
=> quick click : the same behaviour in all Firefox I did test
=> long click : Firefox since 2012-10-12 do not let the popup keep the focus

Regards,
Flags: needinfo?(nicolas.hermestroff)
Attachment #709062 - Attachment description: test case, see comment for explanation → test case, see comment 2 for explanation
The first bad revision is:
changeset:   109947:43218e560c4a
user:        Olli Pettay <Olli.Pettay@helsinki.fi>
date:        Fri Oct 12 01:43:42 2012 +0300
summary:     Bug 799299 - focus contention with two visible html content areas,
r=masayuki

STR:
a) load the URL either from the attachment or the URL in the URL field of this bug report
b) click on the broken images in the blue bar
c) select the last entry from the menu
d) do a long click on the last entry in the submenu
e) the popup window is in the background and without focus (be sure that the popup blocker is disabled)
Blocks: 799299
Status: UNCONFIRMED → NEW
Component: Untriaged → Event Handling
Ever confirmed: true
Product: Firefox → Core
Version: 20 Branch → 19 Branch
Minimal testcase would be really nice.
This is a test case cleaned. The menu is created in menu.js. Non problematic options have been deleted. Now there is only one option in the menu created.

Please note :
1) the problem also affect Aurora 20.0a2
2) the behaviour of IE 9 is the one before the observed regression

I don't think I'll be able able to clean more all JS function. What I'll be able to do is delete each function not called, but is it usefull ?
Attachment #709062 - Attachment is obsolete: true
I tried to narrow further the problem but I lack of knowledge about this. What I know :
- the menu item created is a div element
- the action seems to be : onmousedown -> eval('javascript:showNonModalDialog("../common/emxBlank.html","800","520",true )')
- this action play with focus after window.open (emxUIModal.js line ~236)
- I am absolutely unable to recreate the problem with a separated div, I assume since the clickable div is created by js (in the menu, see menu.js), the problem is related to that.
This has been around since 17 and is an unusual use case so we're going to remove tracking and let a fix for this ride the trains due to concerns about risk of uplift.
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: