Spinner: Fixed key code constants.

This commit is contained in:
Scott González 2008-08-24 19:13:16 +00:00
parent 54dc4e2cd4
commit 49691da7ad

View File

@ -57,7 +57,7 @@ $.widget('ui.spinner', {
})
.bind('keydown.spinner', function(e) {
var KEYS = $.keyCode;
if (e.keyCode == KEYS.SPACE || e.keyCode == KEYS.RETURN) {
if (e.keyCode == KEYS.SPACE || e.keyCode == KEYS.ENTER) {
$(this).addClass('ui-spinner-pressed');
if(!self.counter) self.counter = 1;
self._up.call(self, e);
@ -96,7 +96,7 @@ $.widget('ui.spinner', {
})
.bind('keydown.spinner', function(e) {
var KEYS = $.keyCode;
if (e.keyCode == KEYS.SPACE || e.keyCode == KEYS.RETURN) {
if (e.keyCode == KEYS.SPACE || e.keyCode == KEYS.ENTER) {
$(this).addClass('ui-spinner-pressed');
if(!self.counter) self.counter = 1;
self._down.call(self, e);