Skip to content
Browse files

Merge pull request #55 from pgherveou/master

fixed double callback call in confirmation
  • Loading branch information...
2 parents d75189a + 74ee31c commit a955cb960f17d1a0bff9da0abbc347b39e43a6a7 @tj tj committed
Showing with 4 additions and 3 deletions.
  1. +3 −2 lib/components/dialog/dialog.js
  2. +1 −1 lib/components/overlay/overlay.js
View
5 lib/components/dialog/dialog.js
@@ -148,9 +148,10 @@ Dialog.prototype.overlay = function(){
.overlay({ closable: true })
.on('hide', function(){
self.closedOverlay = true;
+ self.hide();})
+ .on('close', function(){
self.emit('close');
- self.hide();
- });
+ });
return this;
};
View
2 lib/components/overlay/overlay.js
@@ -1,4 +1,3 @@
-
/**
* Expose `Overlay`.
*/
@@ -33,6 +32,7 @@ function Overlay(options) {
this.el.appendTo('body');
if (this.closable) {
this.el.click(function(){
+ self.emit('close');
self.hide();
});
}

0 comments on commit a955cb9

Please sign in to comment.
Something went wrong with that request. Please try again.