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:
Matthew Hodgson 2014-09-23 23:35:17 +01:00
parent 53ae5bce13
commit b08112f936

View File

@ -146,7 +146,7 @@ angular.module('RoomController')
}])
.directive('commandHistory', [ function() {
return function (scope, element, attrs) {
element.bind("keydown keypress", function (event) {
element.bind("keydown", function (event) {
var keycodePressed = event.which;
var UP_ARROW = 38;
var DOWN_ARROW = 40;