aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorTJ VanToll <tj.vantoll@gmail.com>2014-03-05 23:03:17 -0500
committerTJ VanToll <tj.vantoll@gmail.com>2014-03-07 09:31:42 -0500
commitdfc5c34320691bd113250795243ea8b025b1f516 (patch)
tree24ef991e8d5fc732a5c5effeedae4d3f1ca178de /ui
parent343c2651729af2fdf020dd538fce0855785f5a0d (diff)
downloadjquery-ui-dfc5c34320691bd113250795243ea8b025b1f516.tar.gz
jquery-ui-dfc5c34320691bd113250795243ea8b025b1f516.zip
Slider: Switch handles from <a href="#"> to <span tabindex="0">
Fixes #9890 Closes gh-1207
Diffstat (limited to 'ui')
-rw-r--r--ui/slider.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/ui/slider.js b/ui/slider.js
index 6dac9067d..73bfb0273 100644
--- a/ui/slider.js
+++ b/ui/slider.js
@@ -83,7 +83,7 @@ return $.widget( "ui.slider", $.ui.mouse, {
var i, handleCount,
options = this.options,
existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
- handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
+ handle = "<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",
handles = [];
handleCount = ( options.values && options.values.length ) || 1;
@@ -149,11 +149,10 @@ return $.widget( "ui.slider", $.ui.mouse, {
},
_setupEvents: function() {
- var elements = this.handles.add( this.range ).filter( "a" );
- this._off( elements );
- this._on( elements, this._handleEvents );
- this._hoverable( elements );
- this._focusable( elements );
+ this._off( this.handles );
+ this._on( this.handles, this._handleEvents );
+ this._hoverable( this.handles );
+ this._focusable( this.handles );
},
_destroy: function() {
@@ -673,9 +672,6 @@ return $.widget( "ui.slider", $.ui.mouse, {
this._slide( event, index, newVal );
},
- click: function( event ) {
- event.preventDefault();
- },
keyup: function( event ) {
var index = $( event.target ).data( "ui-slider-handle-index" );