Skip to content

Commit

Permalink
Merge pull request #22 from andirotter/patch-1
Browse files Browse the repository at this point in the history
phantom browser doesn't have the hide property you could bind on
  • Loading branch information
19h committed Feb 6, 2015
2 parents 70edbb2 + 60408a1 commit 30eab44
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
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 30eab44

Please sign in to comment.