Skip to content

Commit

Permalink
phantom browser doesn't have the hide property, so the bind on this d…
Browse files Browse the repository at this point in the history
…oesnt work
  • Loading branch information
andirotter committed Feb 6, 2015
1 parent 70edbb2 commit 60408a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Expand Up @@ -73,8 +73,11 @@ function Dialog(options) {
this.render(options);
if (active && !active.hiding) active.hide();
if (exports.effect) this.effect(exports.effect);
this.on('escape', this.hide.bind(this));

active = this;
this.on('escape', function(){
active.hide();
});
};

/**
Expand Down

0 comments on commit 60408a1

Please sign in to comment.