mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Spinner: Re-enable autocomplete if the page is unloaded so the browser will remember the current value when navigating through history.
This commit is contained in:
parent
81b2ef4a60
commit
bdd602e21b
9
ui/jquery.ui.spinner.js
vendored
9
ui/jquery.ui.spinner.js
vendored
@ -49,6 +49,15 @@ $.widget( "ui.spinner", {
|
|||||||
this._draw();
|
this._draw();
|
||||||
this._bind( this._events );
|
this._bind( this._events );
|
||||||
this._refresh();
|
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() {
|
_getCreateOptions: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user