[wayland] KeyboardEvent modifiers true on keyup instead of keydown
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox117 | --- | fixed |
People
(Reporter: lilydjwg, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0
Steps to reproduce:
- open https://w3c.github.io/uievents/tools/key-event-viewer.html
- press Alt key once
Actual results:
For the keydown event, getModifierState is -, alt is false, and for keyup getModifierState is Alt and alt is true.
Expected results:
For the keydown event, getModifierState is Alt, alt is true, and for keyup getModifierState is - and alt is false.
On XWayland this issue doesn't happen. With Google Chrome this issue also doesn't happen.
I'm running Wayfire (wlroots-based wayland compositor) on Arch Linux, with Firefox Nightly.
I'm having issues with a cloud game site on which holding Alt key does nothing. With XWayland it works as expected.
Comment 2•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
I believe this is indeed the issue I have with the website, because when I press my other Alt key, the latter event's modifier attributes are expected, and it works for the website. This is an awkward workaround for me as holding two Alt keys for some time will trigger my keyboard to reset its key maps. I have to reach for my laptop's builtin keyboard.
I believe it's caused by the key-press-event from GTK only has the modifier state for the previous key. Firefox has handled this only for X11: https://searchfox.org/mozilla-central/source/widget/gtk/nsGtkKeyUtils.cpp#1787.
when I press my other Alt key
To clarify, I mean to hold one Alt key, and press the other one, because the modifier state is only on the latter keydown event.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 7•2 years ago
|
||
I see that on XWayland too. It may depend which events are queued and if we can detect modifier key in queue.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 8•2 years ago
|
||
Updated•2 years ago
|
Comment 10•2 years ago
|
||
| bugherder | ||
Updated•2 years ago
|
Description
•