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

Commit 051babf

Browse files
committed
ensure overlay is not statically positioned.
1 parent 21e07fc commit 051babf

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

core-overlay.html

+8-7
Original file line numberDiff line numberDiff line change
@@ -325,17 +325,18 @@ <h2>Dialog</h2>
325325
if (transition) {
326326
transition.setup(this.target);
327327
}
328-
// TODO(sorvell): bc
329328
var computed = getComputedStyle(this.target);
329+
var style = this.target.style;
330+
var isStatic = computed.position === 'static';
331+
var defaultPosition = 'fixed';
332+
// TODO(sorvell): bc
330333
this.targetStyle = {
331-
position: computed.position === 'static' ? 'fixed' :
332-
computed.position
334+
position: isStatic ? defaultPosition : computed.position
333335
};
334-
if (!transition) {
335-
this.target.style.outline = 'none';
336-
// TODO(sorvell): needed for bc for now.
337-
this.target.style.position = this.targetStyle.position;
336+
if (isStatic) {
337+
style.position = 'fixed';
338338
}
339+
this.target.style.outline = 'none';
339340
this.target.style.display = 'none';
340341
},
341342

0 commit comments

Comments
 (0)