on safari at least keypress's event.which returns ASCII rather than keycodes, so 38 & 40 was swallowing ( and & rather than up-arrow and down-arrow(!)
This commit is contained in:
parent
53ae5bce13
commit
b08112f936
|
@ -146,7 +146,7 @@ angular.module('RoomController')
|
||||||
}])
|
}])
|
||||||
.directive('commandHistory', [ function() {
|
.directive('commandHistory', [ function() {
|
||||||
return function (scope, element, attrs) {
|
return function (scope, element, attrs) {
|
||||||
element.bind("keydown keypress", function (event) {
|
element.bind("keydown", function (event) {
|
||||||
var keycodePressed = event.which;
|
var keycodePressed = event.which;
|
||||||
var UP_ARROW = 38;
|
var UP_ARROW = 38;
|
||||||
var DOWN_ARROW = 40;
|
var DOWN_ARROW = 40;
|
||||||
|
|
Loading…
Reference in New Issue