Skip to content

Commit 60408a1

Browse files
committed
phantom browser doesn't have the hide property, so the bind on this doesnt work
1 parent 70edbb2 commit 60408a1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,11 @@ function Dialog(options) {
7373
this.render(options);
7474
if (active && !active.hiding) active.hide();
7575
if (exports.effect) this.effect(exports.effect);
76-
this.on('escape', this.hide.bind(this));
76+
7777
active = this;
78+
this.on('escape', function(){
79+
active.hide();
80+
});
7881
};
7982

8083
/**

0 commit comments

Comments
 (0)