Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hofmeister committed Feb 19, 2014
1 parent 0dc51c5 commit 5d5e045
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions js/lib/widget.js
Expand Up @@ -2174,6 +2174,8 @@ $wb.ui.DropdownMenu = $wb.Class('DropdownMenu', {
} }
}); });


this.elm().bind('click',this.detach.bind(this));

}, },
render: function (element) { render: function (element) {
if (!element) throw _("Dropdown menu requires first argument for render to be an element"); if (!element) throw _("Dropdown menu requires first argument for render to be an element");
Expand All @@ -2186,6 +2188,11 @@ $wb.ui.DropdownMenu = $wb.Class('DropdownMenu', {


this._boundHide = this.detach.bind(this); this._boundHide = this.detach.bind(this);
this._element.bindOnce('click', this._boundHide); this._element.bindOnce('click', this._boundHide);
var widget = $wb(this._element);
if (widget) {
widget.bind('detach',this._boundHide);
}

element.addClass('wb-active'); element.addClass('wb-active');


var out = this.__super(); var out = this.__super();
Expand Down

0 comments on commit 5d5e045

Please sign in to comment.