Fixes #3342, prevents bubbling (and default key behaviour) for slider based key events.

This commit is contained in:
David Bolter 2008-09-11 15:18:33 +00:00
parent a681cd97c9
commit bb84cbf7fd

View File

@ -113,7 +113,7 @@ $.widget("ui.slider", {
.parent() .parent()
.bind('focus', function(e) { self._focus(this.firstChild); }) .bind('focus', function(e) { self._focus(this.firstChild); })
.bind('blur', function(e) { self._blur(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 // Bind the click to the slider itself
@ -173,7 +173,9 @@ $.widget("ui.slider", {
x: xpos, x: xpos,
y: ypos y: ypos
}, handle); }, handle);
return false;
} }
return true;
}, },
_focus: function(handle,hard) { _focus: function(handle,hard) {
this.currentHandle = $(handle).addClass('ui-slider-handle-active'); this.currentHandle = $(handle).addClass('ui-slider-handle-active');