Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
use empty string to remove style property, fixes #8
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiefu committed Jul 25, 2014
1 parent d96846c commit 34a82a4
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions core-overlay.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ <h2>Dialog</h2>
if (transition) {
transition.teardown(old);
} else {
old.style.position = null;
old.style.outline = null;
old.style.position = '';
old.style.outline = '';
}
old.style.display = null;
old.style.display = '';
}
},

Expand All @@ -284,7 +284,7 @@ <h2>Dialog</h2>
return;
}
this.target.__overlaySetup = true;
this.target.style.display = null;
this.target.style.display = '';
var transition = this.getTransition();
if (transition) {
transition.setup(this.target);
Expand All @@ -309,7 +309,7 @@ <h2>Dialog</h2>
// note: we wait a full frame so that transition changes executed
// during measuring do not cause transition
this.async(function() {
this.target.style.display = null;
this.target.style.display = '';
this.async('renderOpened');
});
this.fire('core-overlay-open', this.opened);
Expand Down Expand Up @@ -414,13 +414,13 @@ <h2>Dialog</h2>
prepareMeasure: function(target) {
target.style.transition = target.style.webkitTransition = 'none';
target.style.transform = target.style.webkitTransform = 'none';
target.style.display = null;
target.style.display = '';
},

finishMeasure: function(target) {
target.style.display = 'none';
target.style.transform = target.style.webkitTransform = null;
target.style.transition = target.style.webkitTransition = null;
target.style.transform = target.style.webkitTransform = '';
target.style.transition = target.style.webkitTransition = '';
},

getTransition: function() {
Expand Down Expand Up @@ -480,9 +480,9 @@ <h2>Dialog</h2>
},

resetTargetDimensions: function() {
this.target.style.top = this.target.style.left = null;
this.target.style.right = this.target.style.bottom = null;
this.target.style.width = this.target.style.height = null;
this.target.style.top = this.target.style.left = '';
this.target.style.right = this.target.style.bottom = '';
this.target.style.width = this.target.style.height = '';
this._shouldPosition = null;
},

Expand Down Expand Up @@ -605,7 +605,7 @@ <h2>Dialog</h2>
var i = overlays.indexOf(overlay);
if (i >= 0) {
overlays.splice(i, 1);
setZ(overlay, null);
setZ(overlay, '');
}
}

Expand Down

0 comments on commit 34a82a4

Please sign in to comment.