From 1ed26e231b857b83e67825170f3905fbbcdda05d Mon Sep 17 00:00:00 2001 From: jlukic Date: Tue, 13 Jan 2015 15:35:02 -0500 Subject: [PATCH] Fix #1604, Checkbox toggles on spacebar --- src/definitions/modules/checkbox.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/definitions/modules/checkbox.js b/src/definitions/modules/checkbox.js index 39e4a8a3b..7a602f831 100644 --- a/src/definitions/modules/checkbox.js +++ b/src/definitions/modules/checkbox.js @@ -137,6 +137,7 @@ $.fn.checkbox = function(parameters) { key = event.which, keyCode = { enter : 13, + space : 32, escape : 27 } ; @@ -146,7 +147,7 @@ $.fn.checkbox = function(parameters) { .blur() ; } - if(!event.ctrlKey && key == keyCode.enter) { + if(!event.ctrlKey && (key == keyCode.enter || key == keyCode.space)) { module.verbose('Enter key pressed, toggling checkbox'); module.toggle.call(this); event.preventDefault();