From bb84cbf7fd345d8bf37f637604e607db4ce772a7 Mon Sep 17 00:00:00 2001 From: David Bolter Date: Thu, 11 Sep 2008 15:18:33 +0000 Subject: [PATCH] Fixes #3342, prevents bubbling (and default key behaviour) for slider based key events. --- ui/ui.slider.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/ui.slider.js b/ui/ui.slider.js index e2bdecff1..be466a787 100644 --- a/ui/ui.slider.js +++ b/ui/ui.slider.js @@ -113,7 +113,7 @@ $.widget("ui.slider", { .parent() .bind('focus', function(e) { self._focus(this.firstChild); }) .bind('blur', function(e) { self._blur(this.firstChild); }) - .bind('keydown', function(e) { if(!self.options.noKeyboard) self._keydown(e.keyCode, this.firstChild); }) + .bind('keydown', function(e) { if(!self.options.noKeyboard) return self._keydown(e.keyCode, this.firstChild); }) ; // Bind the click to the slider itself @@ -173,7 +173,9 @@ $.widget("ui.slider", { x: xpos, y: ypos }, handle); + return false; } + return true; }, _focus: function(handle,hard) { this.currentHandle = $(handle).addClass('ui-slider-handle-active');