mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
slider: only return false on handle keydown if one of arrow keys or pgup/down are pressed (otherwise tab is broken)
This commit is contained in:
parent
12d2b5e720
commit
639da64b34
@ -88,6 +88,8 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
|
|||||||
|
|
||||||
this.handles.keydown(function(event) {
|
this.handles.keydown(function(event) {
|
||||||
|
|
||||||
|
var ret = true;
|
||||||
|
|
||||||
var index = $(this).data("index.ui-slider-handle");
|
var index = $(this).data("index.ui-slider-handle");
|
||||||
|
|
||||||
if (self.options.disabled)
|
if (self.options.disabled)
|
||||||
@ -100,6 +102,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
|
|||||||
case $.ui.keyCode.RIGHT:
|
case $.ui.keyCode.RIGHT:
|
||||||
case $.ui.keyCode.DOWN:
|
case $.ui.keyCode.DOWN:
|
||||||
case $.ui.keyCode.LEFT:
|
case $.ui.keyCode.LEFT:
|
||||||
|
ret = false;
|
||||||
if (!self._keySliding) {
|
if (!self._keySliding) {
|
||||||
self._keySliding = true;
|
self._keySliding = true;
|
||||||
$(this).addClass("ui-state-active");
|
$(this).addClass("ui-state-active");
|
||||||
@ -136,7 +139,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
|
|||||||
|
|
||||||
self._slide(event, index, newVal);
|
self._slide(event, index, newVal);
|
||||||
|
|
||||||
return false;
|
return ret;
|
||||||
|
|
||||||
}).keyup(function(event) {
|
}).keyup(function(event) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user