Added a check for DOM 3 getModifierState before attempting to use it, as some browsers may not have implemented that spec yet (Like stable Safari)
This commit is contained in:
parent
ed44c6747f
commit
c7a5d8decf
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue