From 9615cea06f0835f7ab58862f9e7c3708289b82f2 Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Wed, 5 Mar 2014 23:03:17 -0500 Subject: [PATCH 1/3] Slider: Switch handles from to Fixes #9890 --- demos/slider/multiple-vertical.html | 2 +- ui/slider.js | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/demos/slider/multiple-vertical.html b/demos/slider/multiple-vertical.html index f047f14f5ed..70ab8330f9d 100644 --- a/demos/slider/multiple-vertical.html +++ b/demos/slider/multiple-vertical.html @@ -11,7 +11,7 @@ diff --git a/ui/slider.js b/ui/slider.js index 6dac9067dd2..22f0262b81d 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 = "", + handle = "", handles = []; handleCount = ( options.values && options.values.length ) || 1; @@ -149,7 +149,7 @@ return $.widget( "ui.slider", $.ui.mouse, { }, _setupEvents: function() { - var elements = this.handles.add( this.range ).filter( "a" ); + var elements = this.handles.add( this.range ).filter( ".ui-slider-handle" ); this._off( elements ); this._on( elements, this._handleEvents ); this._hoverable( elements ); @@ -673,9 +673,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" ); From e9720ea940f7b3ffaabbc1a65879c7a9377d7658 Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Fri, 7 Mar 2014 08:59:20 -0500 Subject: [PATCH 2/3] Fix: Remove unnecessary elements reference. --- ui/slider.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/slider.js b/ui/slider.js index 22f0262b81d..f5539678342 100644 --- a/ui/slider.js +++ b/ui/slider.js @@ -149,11 +149,11 @@ return $.widget( "ui.slider", $.ui.mouse, { }, _setupEvents: function() { - var elements = this.handles.add( this.range ).filter( ".ui-slider-handle" ); - this._off( elements ); - this._on( elements, this._handleEvents ); - this._hoverable( elements ); - this._focusable( elements ); + this.handles.add( this.range ).filter( ".ui-slider-handle" ); + this._off( this.handles ); + this._on( this.handles, this._handleEvents ); + this._hoverable( this.handles ); + this._focusable( this.handles ); }, _destroy: function() { From ec758d7ce8ba8133e81813d3595170402c467f79 Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Fri, 7 Mar 2014 09:17:56 -0500 Subject: [PATCH 3/3] Fix: Remove unnecessary filtering of handles. --- ui/slider.js | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/slider.js b/ui/slider.js index f5539678342..73bfb02736b 100644 --- a/ui/slider.js +++ b/ui/slider.js @@ -149,7 +149,6 @@ return $.widget( "ui.slider", $.ui.mouse, { }, _setupEvents: function() { - this.handles.add( this.range ).filter( ".ui-slider-handle" ); this._off( this.handles ); this._on( this.handles, this._handleEvents ); this._hoverable( this.handles );