[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•2 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•9 months ago
|
Assignee | ||
Comment 7•9 months 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•9 months ago
|
Assignee | ||
Comment 8•9 months ago
|
||
Updated•9 months ago
|
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/e491a43ef9e8 [Wayland] Set modifiers according to key press/release r=emilio
Comment 10•9 months ago
|
||
bugherder |
Updated•9 months ago
|
Description
•