Fast keyboard entry causes character loss in the typed characters (QR code scanner as keyboard)
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
People
(Reporter: mezeipetister, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0
Steps to reproduce:
- Open Firefox
- Open an empty page
- Plug in a 2D barcode reader via USB
- Scan a QR code, with the following content: http://gardenzilla.hu/upl/1
- Repeat it until, the typed string is going to loss a character. In my case /upl/1 is going to be /up/1, so the "l" is missing.
Actual results:
Very very strange behaviour. If I open a gedit, and start to scan with the same barcode reader (Zebra DS2208), there is no error at all. If I scan the same QR code 300 times, all the scans are okay.
If I open Google Chrome, also there is no error at all.
If I open any times Firefox, the same issue occurs.
If I open my web app, and using the same QR code reader in a selected input field, it behaves the same way. Sometimes, there is missing character.
It's very strange, I tested it at least a 1.000 times, and only 2 kind of character missing ocured:
- when the http://gardenzilla.hu/upl/1 => http://gardenzilla.hu/up/1, so the "l" is missing from the /upl/ part
- and when the http://gardenzilla.hu/upl/1 => http://gardenzilla.hu/upl1, so the last slash "/" is missing after the upl part.
Expected results:
The entered string should be the same all the times, without random character loss.
I checked the QR code and the reader as well. If I do the same test but using any other software, the character loss issue does not occur.
Reporter | ||
Comment 1•4 years ago
|
||
The QR code reader works like: reading the characters from the QR code, and types them one by one, and for last, it sends an enter character.
My first guess was the too fast entry, so scanning 2-3 codes per sec, and auto pressing enters after each other, can cause the issue, but no.
If I just use the scanner slowly, like 1 barcode per 2 sec, then some times the same issue happens.
So now my guess is, there could be some issue during the fast character typing.
Reporter | ||
Comment 2•4 years ago
|
||
Sometimes I got the following misspelled strings:
- http://gardenzilla.hu/pl/1 => so /pl/ instead of /upl/
- htp://gardenzilla.hu/upl/1 => so htp:// instead of http://
Reporter | ||
Comment 3•4 years ago
|
||
If I set the QR code scanner, to apply 20 ms delay between key strokes, then the error disappear,
but it becomes extremely slow, so this is not a real life scenario, when doing sales job and scanning product items in a shop.
Comment 4•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Reporter | ||
Comment 5•4 years ago
|
||
(In reply to Release mgmt bot [:sylvestre / :calixte / :marco for bugbug] from comment #4)
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Maybe..
Comment 6•4 years ago
|
||
Doesn't look like a graphics issue to me. Also, this could be very annoying to the users if they type something and Firefox misses the characters.
Comment 7•4 years ago
|
||
Sounds like dup of bug 1098981, but it should occur only when KeyboadEvent.repeat
is set to true
.
Could you check the .repeat
value with in the test suite? I guess that the scanner generates same hardware keycode events and we drop some events to avoid content process being busy.
Reporter | ||
Comment 8•4 years ago
|
||
But if I use the barcode scanner and scan the code to the Firefox address bar, the same issue occurs. Does that means something?
Reporter | ||
Comment 9•4 years ago
|
||
You can see what happens when there is a missing U from /upl/, so it types just /pl/
Based on the tool results, its like pressing up the U character (event #121), but there is no press down event to the U character.
Reporter | ||
Comment 10•4 years ago
|
||
It also strange, that it types http://, but in the event list there is no sign of it. Its like starting with event #47, by pressing g. But the http:// is typed.. If i type it by my hand, then it starts from event 1 and it displays the key events for the http:// part as well.
Reporter | ||
Comment 11•4 years ago
|
||
Here, the / is missing after /upl. So instead of /upl/1, it typed /upl1
The tool shows a similar issue. Event #138/139 shows, there were keyup + 6 event, but there is no keydown + 6 before.
Also in my tests, the .repeat was never true.
Reporter | ||
Comment 12•4 years ago
|
||
And one important thing. My barcode reader is in HID emulation mode, so it emulates itself as a keyboard. This issue is only occurs when using Firefox.
Reporter | ||
Comment 13•4 years ago
|
||
Should I do more tests?
Comment 14•4 years ago
|
||
(In reply to Peter Mezei from comment #8)
But if I use the barcode scanner and scan the code to the Firefox address bar, the same issue occurs. Does that means something?
Yeah, that means you hit another bug.
According to your test result, the scanner types keys faster than communicating with your IME. I guess that it works with <input style="ime-mode: disabled;">
. Could you check it? (I still don't have idea how to fix it if my guess is right...)
Updated•4 years ago
|
Reporter | ||
Comment 15•4 years ago
|
||
Is there any way to manage it using your tool?
I created a small html test - using my opened angular project -, and using <input style="ime-mode: disabled;"> the same issue occurs.
The html source code:
<input style="ime-mode: disabled;" #input>
<br>
<button (click)="input.value=''; input.focus()">Clear</button>
It's also worth to mention, that this issue only occurs in 1-2 of 10 times. So if I scan the same code, 8 out of 10, it is going to be correct, and 1-2 out of 10 is going to be with missing characters.
So it's strange, I guess the barcode reader has the same scan and type speed as constant.
Reporter | ||
Comment 16•4 years ago
|
||
The same issue did occur hhen I did the test, using the following html code:
<input style="ime-mode: disabled;" #input>
<br>
<button (click)="input.value=''; input.focus()">Clear</button>
Reporter | ||
Comment 17•4 years ago
|
||
And it's also interesting that; It's like there might be a pattern in the missing character cases.
Till now, I found only 3 types, of repeating issues
When I use this barcode content: http://gardenzilla.hu/upl/1 then:
- http:// => one t is missing sometimes, so htp://
- gardenzilla.hu is always perfect
- /upl/1 sometimes u is missing, so pl/,
- /upl/1 sometimes the last / is missing, so /upl
- /-upl/1, the last part after the last / is an integer. Whatever integer is there, the value is always correct, so there is no missing character at all.
And what I wrote before. Scanning to an html field, or scanning to the Firefox address bar, the issue occurs only 1-2 times out of 10.
Comment 18•4 years ago
|
||
I think that I should be back this bug after beforeinput
event support. Probably, we need to think how to support ibus/fcitx's hacky async IME support.
Reporter | ||
Comment 19•4 years ago
|
||
And do you think its something that I can wait for in a short period of time, to be fixed; or Its something that will be fixed in long term?
Description
•