Permalink
Browse files

bug fix

  • Loading branch information...
hofmeister committed Feb 19, 2014
1 parent 0dc51c5 commit 5d5e045e554e26d0106f000f567830ee60311618
Showing with 7 additions and 0 deletions.
  1. +7 −0 js/lib/widget.js
View
@@ -2174,6 +2174,8 @@ $wb.ui.DropdownMenu = $wb.Class('DropdownMenu', {
}
});
+ this.elm().bind('click',this.detach.bind(this));
+
},
render: function (element) {
if (!element) throw _("Dropdown menu requires first argument for render to be an element");
@@ -2186,6 +2188,11 @@ $wb.ui.DropdownMenu = $wb.Class('DropdownMenu', {
this._boundHide = this.detach.bind(this);
this._element.bindOnce('click', this._boundHide);
+ var widget = $wb(this._element);
+ if (widget) {
+ widget.bind('detach',this._boundHide);
+ }
+
element.addClass('wb-active');
var out = this.__super();

0 comments on commit 5d5e045

Please sign in to comment.