summaryrefslogtreecommitdiff
path: root/core/util/browser.js
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-03-09 16:51:23 +0100
committerPierre Ossman <ossman@cendio.se>2018-03-13 16:01:38 +0100
commit3a7c0c67c174d880a1df11b6c2f6c020dd492451 (patch)
tree846295680807b7836d2655278b5f75f6e35ff791 /core/util/browser.js
parente9118e3bdac0269dafed23153a33781f5b679aa6 (diff)
downloadnovnc-3a7c0c67c174d880a1df11b6c2f6c020dd492451.tar.gz
Work around broken Alt keyup in Firefox
Firefox no longer sends keyup events properly for the Alt keys. Try to sniff out the state of the Alt key by monitoring other events that include its state.
Diffstat (limited to 'core/util/browser.js')
-rw-r--r--core/util/browser.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/util/browser.js b/core/util/browser.js
index ab0e7ee..7a78eee 100644
--- a/core/util/browser.js
+++ b/core/util/browser.js
@@ -56,6 +56,10 @@ export function isEdge() {
return navigator && !!(/edge/i).exec(navigator.userAgent);
}
+export function isFirefox() {
+ return navigator && !!(/firefox/i).exec(navigator.userAgent);
+}
+
export function isWindows() {
return navigator && !!(/win/i).exec(navigator.platform);
}