Permalink
Browse files

Fixed a `self` reference in Menu

  • Loading branch information...
1 parent bcc346b commit 605381155bf5a3c85357431f03f1785b6de8ba8c @tj tj committed May 21, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 build/ui.js
  2. +1 −1 lib/components/menu/menu.js
View
@@ -1318,7 +1318,7 @@ function Menu() {
this.items = {};
this.el = $(html).hide().appendTo('body');
this.el.hover(this.deselect.bind(this));
- $('html').click(function(){ self.hide(); });
+ $('html').click(this.hide.bind(this));
this.on('show', this.bindKeyboardEvents.bind(this));
this.on('hide', this.unbindKeyboardEvents.bind(this));
};
@@ -34,7 +34,7 @@ function Menu() {
this.items = {};
this.el = $(html).hide().appendTo('body');
this.el.hover(this.deselect.bind(this));
- $('html').click(function(){ self.hide(); });
+ $('html').click(this.hide.bind(this));
this.on('show', this.bindKeyboardEvents.bind(this));
this.on('hide', this.unbindKeyboardEvents.bind(this));
};

0 comments on commit 6053811

Please sign in to comment.