From aab996398eade22d35e4ea5a845fc55a458bfed8 Mon Sep 17 00:00:00 2001 From: Jono Brandel Date: Thu, 17 Feb 2011 15:15:25 -0800 Subject: [PATCH] Added the enter or return key command on numberField elements of numberController --- controllers/controller.number.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/controller.number.js b/controllers/controller.number.js index 7c5923a..ab20ef5 100644 --- a/controllers/controller.number.js +++ b/controllers/controller.number.js @@ -66,6 +66,10 @@ GUI.NumberController = function() { numberField.addEventListener('keydown', function(e) { var newVal; switch(e.keyCode) { + case 13: + newVal = this.getValue(); + _this.setValue(newVal); + break; case 38: // up newVal = _this.getValue() + step; _this.setValue(newVal);