Closed
Bug 1504692
Opened 6 years ago
Closed 6 years ago
Duplicate key events when typing fast
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P5)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
WORKSFORME
Tracking | Status | |
---|---|---|
firefox63 | --- | wontfix |
firefox64 | --- | wontfix |
firefox65 | --- | fix-optional |
firefox66 | --- | affected |
People
(Reporter: mkaply, Unassigned)
References
()
Details
(Keywords: regression)
When you type very fast, Firefox gets duplicate key events. Chrome (and other browsers) do not.
To recreate:
go to
https://embed.plnkr.co/aXoLcM8oCx583xWC2RlT/
Put focus in the entry field. Type 1234567890 very fast (Easiest to do on a Mac by just dragging your finger across the number keys).
Notice that randomly, you get an extra number.
Reporter | ||
Comment 1•6 years ago
|
||
Likely caused by
https://bugzilla.mozilla.org/show_bug.cgi?id=1390044
Keywords: regression,
regressionwindow-wanted
Comment 4•6 years ago
|
||
Like, there is repeated keypress then. Just press any key for a long time.
Reporter | ||
Comment 5•6 years ago
|
||
> Like, there is repeated keypress then. Just press any key for a long time.
It's not a repeated keypress. The keys are pressed extremely fast and not held down.
Comment 6•6 years ago
|
||
On Chrome key input handling seems to be way jankier with that test.
Reporter | ||
Comment 7•6 years ago
|
||
> On Chrome key input handling seems to be way jankier with that test.
Yeah, it waits until typing is done to put anything in.
Oddly Safari is fast.
Comment 8•6 years ago
|
||
Blink's timers are slower than in Gecko, IIRC. So, timer may very well fire before keypress.
So both the timer and keypress listener end up calling appendToOutput.
Updated•6 years ago
|
Priority: -- → P2
Whiteboard: [qf]
Comment 10•6 years ago
|
||
Blocks: 1390044
Keywords: regressionwindow-wanted
Comment 11•6 years ago
|
||
As far as I see, the behavior could happen even before bug 1390044, and I've been told it does.
This is more likely a change from e10s.
No longer blocks: 1390044
Reporter | ||
Comment 12•6 years ago
|
||
I agree with Olli.
I was able to recreate this back to November 2016. (I'm still going farther back).
With the older builds, just typing one character a few times is enough to get the repeat.
FYI, A better way to recreate is just to bang really fast on some keys while in the entry field.
When you are done, the text below should match the entryfield exactly. If it doesn't, you have the bug.
Doing it this way avoids the problem where holding a key down too long repeats.
Reporter | ||
Comment 13•6 years ago
|
||
It looks like it regressed between November 5 and November 6 2016
Comment 14•6 years ago
|
||
FWIW,
I can reproduce the issue on Windows10 if I removed a for loop from https://embed.plnkr.co/aXoLcM8oCx583xWC2RlT/
good build: https://archive.mozilla.org/pub/firefox/tinderbox-builds/mozilla-inbound-win32/1478549667/
bad build: https://archive.mozilla.org/pub/firefox/tinderbox-builds/mozilla-inbound-win32/1478550687/
Regression window:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=d19cffeae1febc6d669a024340de25228e544475&tochange=24d97dc514d4b8fe608e9aee7527615c1e613606
it seems Bug 1300659 trigger the bug.
Reporter | ||
Comment 15•6 years ago
|
||
> it seems Bug 1300659 trigger the bug.
Thank you! And that maps to right around when I was seeing it.
Blocks: 1300659
Comment 17•6 years ago
|
||
Further investigation,
Umm, type fast enough, the regression window is
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=c04f84afb1bd6b3ea372164012735de6c8f2d582&tochange=b4ade2b0841c5825968f34752d86ee09507a0a9f
Triggered by: b4ade2b0841c David Anderson — Enable the GPU process for Nightly Windows users. (bug 1314133, r=milan)
good build: https://archive.mozilla.org/pub/firefox/tinderbox-builds/mozilla-inbound-win32/1478309966/
bad build: https://archive.mozilla.org/pub/firefox/tinderbox-builds/mozilla-inbound-win32/1478310501/
Could someone double check the regression window with these good/bad build of Comment 14 and Comment 16.
Comment 18•6 years ago
|
||
Mike, can you verify the builds that Alice linked to?
Flags: needinfo?(mozilla)
Updated•6 years ago
|
Reporter | ||
Comment 19•6 years ago
|
||
I see the same results as Alice.
1478309966 good
1478310501 bad (lots of duplication)
Flags: needinfo?(mozilla)
Reporter | ||
Comment 20•6 years ago
|
||
It was definitely enabling the GPU process that caused this.
Flipping that pref fixes it.
Blocks: 1314133
Reporter | ||
Comment 21•6 years ago
|
||
VMWare repinged us on this as an issue with their VSphere web client.
While they put in a workaround, they want to know when we are going to fix.
This seems to fall squarely into the "we broke enterprise software" bucket.
I'm having trouble getting any traction on this though inside Mozilla.
NIing Mike Taylor to see if he has any advice.
(Side note - while enabling the GPU process broke this originally, clearly there are other things going on because it is repeatable on Mac. We need someone who really understands eventing to figure out what is going on here).
Flags: needinfo?(miket)
Comment 22•6 years ago
|
||
My guess here is that the web site assumes keydown and keypress happening during the same task, and no spec defines that. In e10s those are in separate tasks.
The example script clearly is buggy on that, it lets timeout to fire between keydown and keypress and execute appendToOutput on both cases. (it is unclear to me what the code is trying to do)
Comment 23•6 years ago
|
||
Mike, can we get access to the VSphere web client to investigate what exactly they're doing?
Flags: needinfo?(miket) → needinfo?(mozilla)
Reporter | ||
Comment 24•6 years ago
|
||
They've worked around the problem in the latest vsphere client. The plunker above is the code they are using.
I'll see if I can get more info.
Reporter | ||
Comment 25•6 years ago
|
||
They (VMWare) are now saying their workaround is good enough and that we can close the issue for now.
I'm still concerned that we have a key difference between Firefox and Chrome.
We should at least keep an eye out to see if anyone else runs into this.
Closing for now.
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(mozilla)
Resolution: --- → WORKSFORME
Assignee | ||
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
•