mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app/internal/window: fix support for Safari 11.1
Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
This commit is contained in:
@@ -281,6 +281,10 @@ func (w *window) keyEvent(e js.Value, ks key.State) {
|
||||
// KeyEvent.
|
||||
func modifiersFor(e js.Value) key.Modifiers {
|
||||
var mods key.Modifiers
|
||||
if e.Get("getModifierState").IsUndefined() {
|
||||
// Some browsers doesn't support getModifierState.
|
||||
return mods
|
||||
}
|
||||
if e.Call("getModifierState", "Alt").Bool() {
|
||||
mods |= key.ModAlt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user