summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2011-10-18 01:29:41 +0200
committerFelix Nagel <info@felixnagel.com>2011-10-18 01:29:41 +0200
commit410b0b6cd0f14b261d236abde2b79f2c16cc3cc2 (patch)
treeb8b4b6a7a8e1a028a72ac945b0ff07e3dcd81137
parentc9f281c6aaf1b41ce69754bff89fb96b3fdc41ca (diff)
downloadjquery-ui-410b0b6cd0f14b261d236abde2b79f2c16cc3cc2.tar.gz
jquery-ui-410b0b6cd0f14b261d236abde2b79f2c16cc3cc2.zip
fixed: destroy method (issue with window event), thx to @thg2k, see #177
-rw-r--r--ui/jquery.ui.selectmenu.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js
index ada778b58..fa7e21aaf 100644
--- a/ui/jquery.ui.selectmenu.js
+++ b/ui/jquery.ui.selectmenu.js
@@ -151,7 +151,7 @@ $.widget("ui.selectmenu", {
});
// document click closes menu
- $(document).bind("mousedown.selectmenu", function(event) {
+ $(document).bind("mousedown.selectmenu-" + this.ids[0], function(event) {
self.close(event);
});
@@ -254,7 +254,7 @@ $.widget("ui.selectmenu", {
.bind( 'mousedown.selectmenu mouseup.selectmenu', function() { return false; });
// needed when window is resized
- $(window).bind( "resize.selectmenu", $.proxy( self.close, this ) );
+ $(window).bind( "resize.selectmenu-" + this.ids[0], $.proxy( self.close, this ) );
},
_init: function() {
@@ -442,8 +442,8 @@ $.widget("ui.selectmenu", {
.removeAttr( 'aria-disabled' )
.unbind( ".selectmenu" );
- $( window ).unbind( ".selectmenu" );
- $( document ).unbind( ".selectmenu" );
+ $( window ).unbind( ".selectmenu-" + this.ids[0] );
+ $( document ).unbind( ".selectmenu-" + this.ids[0] );
// unbind click on label, reset its for attr
$( 'label[for=' + this.ids[0] + ']' )