Permalink
Browse files

Fixed Dialog .hide() thrashing

  • Loading branch information...
1 parent 1a9db2e commit eb885963247415955953795e60490c22e08774af @tj tj committed May 4, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/components/dialog/dialog.js
@@ -53,7 +53,7 @@ function Dialog(options) {
this.template = html;
this.el = $(this.template);
this.render(options);
- if (active) active.hide();
+ if (active && !active.hiding) active.hide();
if (Dialog.effect) this.effect(Dialog.effect);
active = this;
};
@@ -211,6 +211,9 @@ Dialog.prototype.show = function(){
Dialog.prototype.hide = function(ms){
var self = this;
+ // prevent thrashing
+ this.hiding = true;
+
// duration
if (ms) {
setTimeout(function(){

0 comments on commit eb88596

Please sign in to comment.