Merge pull request #628 from kode54/dom3-check

Added a check for DOM 3 getModifierState before attempting to use it
This commit is contained in:
Tor Hveem 2015-06-14 02:00:45 +02:00
commit d07ba4edd1

View file

@ -179,7 +179,8 @@ weechat.directive('inputBar', function() {
// Support different browser quirks
var code = $event.keyCode ? $event.keyCode : $event.charCode;
var altg = $event.getModifierState('AltGraph');
// Safari doesn't implement DOM 3 input events yet as of 8.0.6
var altg = $event.getModifierState ? $event.getModifierState('AltGraph') : false;
// Mac OSX behaves differntly for altgr, so we check for that
if (altg) {