Skip to main content

Search and Top Navigation

Ticket #3081: slider.diff


File slider.diff, 0.6 KB (added by davidb, July 10, 2008 02:28AM UTC)

A minimal patch that fixes arrow interaction.

Index: ui/ui.slider.js
===================================================================
--- ui/ui.slider.js	(revision 431)
+++ ui/ui.slider.js	(working copy)
@@ -158,9 +158,10 @@
 	
 	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);
 		}
 	},

Download in other formats:

Original Format