Closed
Bug 1275384
Opened 9 years ago
Closed 9 years ago
[e10s] bugzilla text boxes fail to take focus
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
FIXED
mozilla49
People
(Reporter: jimm, Assigned: mconley)
References
Details
(Keywords: regression)
Attachments
(2 files)
675 bytes,
text/html
|
Details | |
58 bytes,
text/x-review-board-request
|
Felipe
:
review+
Sylvestre
:
approval-mozilla-aurora+
|
Details |
STR:
1) open any bug and set the needinfo flag to ?
expected: focus should move to the text input
actual: focus isn't set in the text input
This does not reproduce under non-e10s.
Neil, any ideas here?
Flags: needinfo?(enndeakin)
Comment 2•9 years ago
|
||
If its a regression, let's ask Mike then!
Flags: needinfo?(enndeakin) → needinfo?(mconley)
Assignee | ||
Comment 4•9 years ago
|
||
Assignee: nobody → mconley
Assignee | ||
Updated•9 years ago
|
Attachment #8756442 -
Attachment mime type: text/plain → text/html
Assignee | ||
Comment 5•9 years ago
|
||
We were using nsIDOMWindowUtils to send mousedown and mouseup events
to the <select> input after a selection was made in e10s mode, but
doing so causes focus to be pulled back to the <select> if any input
or change event handlers tried to shift focus. For example, the
reviewer input on Bugzilla was having its focus stolen after setting
the review flag to r?, which was how this bug was discovered.
Review commit: https://reviewboard.mozilla.org/r/55180/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/55180/
Attachment #8756445 -
Flags: review?(felipc)
Comment 6•9 years ago
|
||
Comment on attachment 8756445 [details]
MozReview Request: Bug 1275384 - Dispatch mousedown, mouseup and click events manually on <select> for e10s instead of using DOMWindowUtils. r?felipe
The patch looks good but I'd like to ask smaug to take a quick look, just as a way to check if this difference in behavior is surprising or expected
Attachment #8756445 -
Flags: feedback?(bugs)
Comment 7•9 years ago
|
||
https://reviewboard.mozilla.org/r/55180/#review51898
::: toolkit/modules/SelectContentHelper.jsm:133
(Diff revision 1)
> - .getInterface(Ci.nsIDOMWindowUtils);
> - let rect = this.element.getBoundingClientRect();
> - dwu.sendMouseEvent("mousedown", rect.left, rect.top, 0, 1, 0, true);
> - dwu.sendMouseEvent("mouseup", rect.left, rect.top, 0, 1, 0, true);
> + for (let eventName of MOUSE_EVENTS) {
> + let mouseEvent = new win.MouseEvent(eventName, {
> + 'view': win,
> + 'bubbles': true,
> + 'cancelable': true,
> + });
So the coordinates are what?
It is not clear to me why this works but the old code doesn't
Assignee | ||
Comment 8•9 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #9)
> https://reviewboard.mozilla.org/r/55180/#review51898
>
> ::: toolkit/modules/SelectContentHelper.jsm:133
> (Diff revision 1)
> > - .getInterface(Ci.nsIDOMWindowUtils);
> > - let rect = this.element.getBoundingClientRect();
> > - dwu.sendMouseEvent("mousedown", rect.left, rect.top, 0, 1, 0, true);
> > - dwu.sendMouseEvent("mouseup", rect.left, rect.top, 0, 1, 0, true);
> > + for (let eventName of MOUSE_EVENTS) {
> > + let mouseEvent = new win.MouseEvent(eventName, {
> > + 'view': win,
> > + 'bubbles': true,
> > + 'cancelable': true,
> > + });
>
> So the coordinates are what?
>
> It is not clear to me why this works but the old code doesn't
The coordinates are 0,0 for the rect of the <select> element (Chrome seems to do the same thing after a click on an <option>).
This "works" in that it dispatches the expected mouse events, but it doesn't draw focus because we're not using DWU to actually synthesize mouse activity; we're just synthesizing the mouse events instead.
Or am I misunderstanding the question?
Flags: needinfo?(bugs)
Comment 9•9 years ago
|
||
Hmm, totally bogus coordinates sounds odd. But ok fine if others do that do.
What about event.buttons?
Flags: needinfo?(bugs)
![]() |
Reporter | |
Comment 10•9 years ago
|
||
Tracy, please track down a regression range on this.
Flags: needinfo?(twalker)
![]() |
Reporter | |
Comment 11•9 years ago
|
||
(In reply to Jim Mathies [:jimm] from comment #3)
> Tracy, please track down a regression range on this.
Sorry, found comment 1 a little farther down in my mailbox
Flags: needinfo?(twalker)
Keywords: regressionwindow-wanted
Comment 12•9 years ago
|
||
Comment on attachment 8756445 [details]
MozReview Request: Bug 1275384 - Dispatch mousedown, mouseup and click events manually on <select> for e10s instead of using DOMWindowUtils. r?felipe
So I gave feedback. .buttons handling at least looks wrong this way.
But that is fixable from JS. But please go through also other properties on the event and ensure they have useful values.
Attachment #8756445 -
Flags: feedback?(bugs)
Comment hidden (obsolete) |
Assignee | ||
Comment 14•9 years ago
|
||
Comment on attachment 8756445 [details]
MozReview Request: Bug 1275384 - Dispatch mousedown, mouseup and click events manually on <select> for e10s instead of using DOMWindowUtils. r?felipe
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/55180/diff/1-2/
Attachment #8756445 -
Attachment description: MozReview Request: Bug 1275384 - Dispatch mousedown, mouseup and click events manually on <select> for e10s instead of using DOMWindowUtils. r?felipe → MozReview Request: Bug 1275384 - Dispatch mouseup and click events manually on <select> for e10s instead of using DOMWindowUtils. r?felipe
Assignee | ||
Comment 15•9 years ago
|
||
So it looks like on Windows, Blink fires a mouseup and then a click after an <option> is selected - even if the user uses the keyboard. Oddly, it's different for OS X (no mouseup or click after an option selection), but I'd really rather not emulate that kind of inconsistency, so I'm going to go with the Windows convention.
I did a comparison of each property for the mouseup and click events for both this patch and Blink, and we seem to match all of the ones that are part of the standard. There are some engine-specific or experimental properties on these events that didn't match in some cases, but I'm not counting those.
Comment 16•9 years ago
|
||
On linux blink fires mousedown when opening select, and then mouseup and click when selecting something on it.
Does Blink really not have .buttons to set to anything when dispatching click?
Assignee | ||
Comment 17•9 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #16)
> On linux blink fires mousedown when opening select, and then mouseup and
> click when selecting something on it.
>
> Does Blink really not have .buttons to set to anything when dispatching
> click?
It has it set to 0, at least in my testing.
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 18•9 years ago
|
||
Comment on attachment 8756445 [details]
MozReview Request: Bug 1275384 - Dispatch mousedown, mouseup and click events manually on <select> for e10s instead of using DOMWindowUtils. r?felipe
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/55180/diff/2-3/
Attachment #8756445 -
Attachment description: MozReview Request: Bug 1275384 - Dispatch mouseup and click events manually on <select> for e10s instead of using DOMWindowUtils. r?felipe → MozReview Request: Bug 1275384 - Dispatch mousedown, mouseup and click events manually on <select> for e10s instead of using DOMWindowUtils. r?felipe
Comment 19•9 years ago
|
||
Comment on attachment 8756445 [details]
MozReview Request: Bug 1275384 - Dispatch mousedown, mouseup and click events manually on <select> for e10s instead of using DOMWindowUtils. r?felipe
https://reviewboard.mozilla.org/r/55180/#review52254
Attachment #8756445 -
Flags: review?(felipc) → review+
Comment hidden (obsolete) |
Assignee | ||
Comment 21•9 years ago
|
||
The above issue is actually more about the change / input events. This one is better: https://github.com/whatwg/html/issues/263
Comment 22•9 years ago
|
||
Comment 23•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Assignee | ||
Comment 24•9 years ago
|
||
Comment on attachment 8756445 [details]
MozReview Request: Bug 1275384 - Dispatch mousedown, mouseup and click events manually on <select> for e10s instead of using DOMWindowUtils. r?felipe
Approval Request Comment
[Feature/regressing bug #]:
Bug 1266575, which I just requested uplift for.
[User impact if declined]:
If bug 1266575 gets uplifted and this does not, then <select> elements will steal focus after the dropdown closes. For example, this is particularly painful on Bugzilla, where a <select> is used to choose a review flag, and then focus is sent to a text input to put the reviewer email address. Without this patch, focus is stolen from the text input and put back on the <select>.
[Describe test coverage new/current, TreeHerder]:
Manual testing for the focus issue. Automated testing ensures that we're still firing the right events.
[Risks and why]:
This is very low risk, and only effects users with e10s enabled.
[String/UUID change made/needed]:
None.
Attachment #8756445 -
Flags: approval-mozilla-aurora?
Updated•9 years ago
|
status-firefox48:
--- → affected
Comment 25•9 years ago
|
||
Comment on attachment 8756445 [details]
MozReview Request: Bug 1275384 - Dispatch mousedown, mouseup and click events manually on <select> for e10s instead of using DOMWindowUtils. r?felipe
Taking it to improve e10s
> only effects users with e10s enabled.
which is going to be a bunch of people very soon ;)
Attachment #8756445 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 26•9 years ago
|
||
has problems to apply to aurora
grafting 347044:b53187f3dc44 "Bug 1275384 - Dispatch mousedown, mouseup and click events manually on <select> for e10s instead of using DOMWindowUtils. r=Felipe"
merging toolkit/modules/SelectContentHelper.jsm
warning: conflicts while merging toolkit/modules/SelectContentHelper.jsm! (edit, then use 'hg resolve --mark')
abort: unresolved conflicts, can't continue
(use 'hg resolve' and 'hg graft --continue')
Flags: needinfo?(mconley)
Assignee | ||
Comment 27•9 years ago
|
||
Yeah, I think the patch for the blocking bug (bug 1266575) needed to be grafted first. This applies cleanly after that.
I'll attempt to re-land this (to Beta, since the uplift just happened) once the trees re-open.
Flags: needinfo?(mconley)
Assignee | ||
Comment 28•9 years ago
|
||
Landed on beta (48):
https://hg.mozilla.org/releases/mozilla-beta/rev/5fe894994e95
Updated•9 years ago
|
QA Whiteboard: [good first verify]
Comment 29•9 years ago
|
||
I have reproduced on Firefox nightly according to(2016-05-24)
It's fixed and verified on Latest Developer Edition and Beta
Latest Developer Edition--Build ID:( 20160630004007 ), User Agent: Mozilla/5.0 (Windows NT 10.0; rv:49.0) Gecko/20100101 Firefox/49.0
Firefox Beta--Build ID:( 20160606200529 ), User Agent: Mozilla/5.0 (Windows NT 10.0; rv:48.0) Gecko/20100101 Firefox/48.0
Tested OS-- Windows10 32bit
QA Whiteboard: [good first verify] → [bugday-20160629]
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•