Permalink
Browse files

Fix IE8 error when a dialog with effect closes

use closure instead of IE's broken setTimeout argument passing
  • Loading branch information...
1 parent 475e147 commit 3e01c1859d833add2db5fedc7a275c8b6b50003b @jpjoyal jpjoyal committed Jun 4, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/components/dialog/dialog.js
View
4 lib/components/dialog/dialog.js
@@ -225,9 +225,9 @@ Dialog.prototype.hide = function(ms){
// hide / remove
this.el.addClass('hide');
if (this._effect) {
- setTimeout(function(self){
+ setTimeout(function(){
self.remove();
- }, 500, this);
+ }, 500);
} else {
self.remove();
}

0 comments on commit 3e01c18

Please sign in to comment.