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

Commit

Permalink
ensure overlay is not statically positioned.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Sep 12, 2014
1 parent 21e07fc commit 051babf
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions core-overlay.html
Original file line number Diff line number Diff line change
Expand Up @@ -325,17 +325,18 @@ <h2>Dialog</h2>
if (transition) {
transition.setup(this.target);
}
// TODO(sorvell): bc
var computed = getComputedStyle(this.target);
var style = this.target.style;
var isStatic = computed.position === 'static';
var defaultPosition = 'fixed';
// TODO(sorvell): bc
this.targetStyle = {
position: computed.position === 'static' ? 'fixed' :
computed.position
position: isStatic ? defaultPosition : computed.position
};
if (!transition) {
this.target.style.outline = 'none';
// TODO(sorvell): needed for bc for now.
this.target.style.position = this.targetStyle.position;
if (isStatic) {
style.position = 'fixed';
}
this.target.style.outline = 'none';
this.target.style.display = 'none';
},

Expand Down

0 comments on commit 051babf

Please sign in to comment.