Skip to content
Permalink
Browse files

Spinner: Re-enable autocomplete if the page is unloaded so the browse…

…r will remember the current value when navigating through history.
  • Loading branch information...
scottgonzalez committed Oct 17, 2011
1 parent 81b2ef4 commit bdd602e21bde0fee9879cc3b5d708c1ab86fb3fc
Showing with 9 additions and 0 deletions.
  1. +9 −0 ui/jquery.ui.spinner.js
@@ -49,6 +49,15 @@ $.widget( "ui.spinner", {
this._draw();
this._bind( this._events );
this._refresh();

// turning off autocomplete prevents the browser from remembering the
// value when navigating through history, so we re-enable autocomplete
// if the page is unloaded before the widget is destroyed. #7790
this._bind( this.element[0].ownerDocument.defaultView, {
beforeunload: function() {
this.element.removeAttr( "autocomplete" );
}
});
},

_getCreateOptions: function() {

0 comments on commit bdd602e

Please sign in to comment.
You can’t perform that action at this time.