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

Commit

Permalink
guarantee overflow is not position static.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell authored and Yvonne Yip committed Sep 16, 2014
1 parent 4587cae commit 6168224
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions core-overlay.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,19 +329,13 @@ <h2>Dialog</h2>
if (transition) {
transition.setup(this.target);
}
var computed = getComputedStyle(this.target);
var style = this.target.style;
var isStatic = computed.position === 'static';
var defaultPosition = 'fixed';
// TODO(sorvell): bc
this.targetStyle = {
position: isStatic ? defaultPosition : computed.position
};
if (isStatic) {
var computed = getComputedStyle(this.target);
if (computed.position === 'static') {
style.position = 'fixed';
}
this.target.style.outline = 'none';
this.target.style.display = 'none';
style.outline = 'none';
style.display = 'none';
},

openedChanged: function() {
Expand Down Expand Up @@ -380,6 +374,7 @@ <h2>Dialog</h2>
// if we are showing, then take care when measuring
this.prepareMeasure();
this.measure();
this.positionTarget();
this.updateTargetDimensions();
this.finishMeasure();
if (this.layered) {
Expand Down

0 comments on commit 6168224

Please sign in to comment.