Skip to content

Commit

Permalink
dom.on target is now second parameter instead of first, and document …
Browse files Browse the repository at this point in the history
…is default
  • Loading branch information
nateps committed Jan 7, 2014
1 parent c4ee8c4 commit ce3247f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dropdown/index.js
Expand Up @@ -5,7 +5,7 @@ Dropdown.prototype.view = __dirname;
Dropdown.prototype.create = function(model, dom) {
// Close on click outside of the dropdown
var dropdown = this;
dom.on(document, 'click', function(e) {
dom.on('click', function(e) {
if (dropdown.toggleButton.contains(e.target)) return;
if (dropdown.menu.contains(e.target)) return;
model.set('open', false);
Expand Down
2 changes: 1 addition & 1 deletion modal/index.js
Expand Up @@ -4,7 +4,7 @@ Modal.prototype.view = __dirname;

Modal.prototype.create = function(model, dom) {
var modal = this;
dom.on(document, 'keydown', function(e) {
dom.on('keydown', function(e) {
if (!model.get('show')) return;
if (e.keyCode === 27) { // Escape
modal.hide('escape');
Expand Down

0 comments on commit ce3247f

Please sign in to comment.