Skip to content

Commit 47c820a

Browse files
committed
rangeslider: update highlight on form reset. Fixes jquery-archive#5773 - Rangeslider layout breaks upon form reset.
1 parent cc7a844 commit 47c820a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

js/widgets/forms/rangeslider.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,20 @@ define( [ "jquery", "../../jquery.mobile.core", "../../jquery.mobile.widget", ".
6767
this._on({
6868
"mousedown":"_change"
6969
});
70+
this._on( this.element.closest( "form" ), {
71+
"reset":"_handleReset"
72+
});
7073
this._on( firstHandle, {
7174
"vmousedown": "_dragFirstHandle"
7275
});
7376
},
77+
_handleReset: function(){
78+
var self = this;
79+
//we must wait for the stack to unwind before updateing other wise sliders will not have updated yet
80+
setTimeout( function(){
81+
self._updateHighlight();
82+
},0);
83+
},
7484

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

0 commit comments

Comments
 (0)