File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 6363 var _self = this ;
6464
6565 // do not include hidden elems if the menu isn't open.
66- var selector = instance . _isOpen ? ':disabled, :hidden' : ':disabled' ;
66+ var selector = _self . _isOpen ? ':disabled, :hidden' : ':disabled' ;
6767
6868 $inputs = $inputs
6969 . not ( selector )
9191 } ;
9292
9393 // rebuild cache when multiselect is updated
94- var doc = $ ( document ) . bind ( 'multiselectrefresh' , $ . proxy ( function ( ) {
94+ var doc = $ ( document ) . bind ( 'multiselectrefresh.' + instance . _namespaceID , $ . proxy ( function ( ) {
9595 this . updateCache ( ) ;
9696 this . _handler ( ) ;
9797 } , this ) ) ;
9898
9999 // automatically reset the widget on close?
100100 if ( this . options . autoReset ) {
101- doc . bind ( 'multiselectclose' , $ . proxy ( this . _reset , this ) ) ;
101+ doc . bind ( 'multiselectclose.' + instance . _namespaceID , $ . proxy ( this . _reset , this ) ) ;
102102 }
103103 } ,
104104
Original file line number Diff line number Diff line change 417417 // restored to their defaultValue prop on form reset, and the reset
418418 // handler fires before the form is actually reset. delaying it a bit
419419 // gives the form inputs time to clear.
420- $ ( this . element [ 0 ] . form ) . bind ( 'reset.multiselect' , function ( ) {
420+ $ ( this . element [ 0 ] . form ) . bind ( 'reset.' + this . _namespaceID , function ( ) {
421421 setTimeout ( $ . proxy ( self . refresh , self ) , 10 ) ;
422422 } ) ;
423423 } ,
644644
645645 // unbind events
646646 $doc . unbind ( this . _namespaceID ) ;
647+ $ ( this . element [ 0 ] . form ) . unbind ( this . _namespaceID ) ;
647648
648649 this . button . remove ( ) ;
649650 this . menu . remove ( ) ;
You can’t perform that action at this time.
0 commit comments