aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.slider.js
diff options
context:
space:
mode:
authorDavid Bolter <david.bolter@gmail.com>2008-07-10 14:28:19 +0000
committerDavid Bolter <david.bolter@gmail.com>2008-07-10 14:28:19 +0000
commit0a12681f3089ca564832ac33c3caf928841bae73 (patch)
tree83558dc8b7baa7db4f24de394fa817f01ea676a0 /ui/ui.slider.js
parent12cdae02b136f7a542dfac7319d008cf9c3d5505 (diff)
downloadjquery-ui-0a12681f3089ca564832ac33c3caf928841bae73.tar.gz
jquery-ui-0a12681f3089ca564832ac33c3caf928841bae73.zip
fix for arrow key operation (refs #3801)
Diffstat (limited to 'ui/ui.slider.js')
-rw-r--r--ui/ui.slider.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/ui.slider.js b/ui/ui.slider.js
index fc4cbd870..fe2d514a0 100644
--- a/ui/ui.slider.js
+++ b/ui/ui.slider.js
@@ -158,9 +158,10 @@ $.widget("ui.slider", {
keydown: function(keyCode, handle) {
if(/(37|38|39|40)/.test(keyCode)) {
+ var oper = /(37|40)/.test(keyCode) ? "-=" : "+=";
this.moveTo({
- x: /(37|39)/.test(keyCode) ? (keyCode == 37 ? '-' : '+') + '=' + this.oneStep("x") : 0,
- y: /(38|40)/.test(keyCode) ? (keyCode == 38 ? '-' : '+') + '=' + this.oneStep("y") : 0
+ x: oper + this.oneStep("x"),
+ y: oper + this.oneStep("y")
}, handle);
}
},