Add support for ESC key in edit-in-place

This commit is contained in:
Arik Fraimovich 2014-03-11 18:16:15 +02:00
parent c87dcf8aac
commit db94db2957

View File

@ -270,6 +270,11 @@
// allow 'shift' to break lines
if (e.which === 13 && !e.shiftKey) {
save();
} else if (e.which === 27) {
$scope.value = $scope.oldValue;
$scope.$apply(function() {
$(inputElement[0]).blur();
});
}
}).blur(function() {
save();