diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2015-10-26 13:13:42 -0400 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2015-10-27 10:28:04 -0400 |
commit | 39853fda45a409e9dc47d7358fbd9b03ad1d33b5 (patch) | |
tree | 6d27d571a5c59a38a10f7fbef5af5f3cdb5945a8 /ui | |
parent | 4e13860067ab6809d260d486ac24d63b30cc664d (diff) | |
download | jquery-ui-39853fda45a409e9dc47d7358fbd9b03ad1d33b5.tar.gz jquery-ui-39853fda45a409e9dc47d7358fbd9b03ad1d33b5.zip |
Selectmenu: Handle form resets
Fixes #12236
Ref gh-1550
Diffstat (limited to 'ui')
-rw-r--r-- | ui/widgets/selectmenu.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/widgets/selectmenu.js b/ui/widgets/selectmenu.js index a4e757be1..b251f04f1 100644 --- a/ui/widgets/selectmenu.js +++ b/ui/widgets/selectmenu.js @@ -24,6 +24,7 @@ "jquery", "./menu", "../escape-selector", + "../form-reset-mixin", "../keycode", "../labels", "../position", @@ -38,7 +39,7 @@ } }( function( $ ) { -return $.widget( "ui.selectmenu", { +return $.widget( "ui.selectmenu", [ $.ui.formResetMixin, { version: "@VERSION", defaultElement: "<select>", options: { @@ -76,6 +77,7 @@ return $.widget( "ui.selectmenu", { this._drawButton(); this._drawMenu(); + this._bindFormResetHandler(); this._rendered = false; this.menuItems = $(); @@ -675,12 +677,13 @@ return $.widget( "ui.selectmenu", { }, _destroy: function() { + this._unbindFormResetHandler(); this.menuWrap.remove(); this.button.remove(); this.element.show(); this.element.removeUniqueId(); this.labels.attr( "for", this.ids.element ); } -} ); +} ] ); } ) ); |