Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
rangeslider: update highlight on form reset. Fixes #5773 - Rangeslide…
Browse files Browse the repository at this point in the history
…r layout breaks upon form reset.
  • Loading branch information
arschmitz committed Apr 1, 2013
1 parent af3c4fa commit ef3a3f8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/widgets/forms/rangeslider.js
Expand Up @@ -67,10 +67,20 @@ define( [ "jquery", "../../jquery.mobile.core", "../../jquery.mobile.widget", ".
this._on({
"mousedown":"_change"
});
this._on( this.element.closest( "form" ), {
"reset":"_handleReset"
});
this._on( firstHandle, {
"vmousedown": "_dragFirstHandle"
});
},
_handleReset: function(){
var self = this;
//we must wait for the stack to unwind before updateing other wise sliders will not have updated yet
setTimeout( function(){
self._updateHighlight();
},0);
},

_dragFirstHandle: function( event ) {
//if the first handle is dragged send the event to the first slider
Expand Down

0 comments on commit ef3a3f8

Please sign in to comment.