Skip to content

Commit 77a1a0b

Browse files
author
Marc J. Schmidt
committed
Merge pull request marcj#24 from maslianok/patch-1
Allow also fixed positioned elements without setting those to relative.
2 parents 00f21d9 + dbe7438 commit 77a1a0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ResizeSensor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
'</div>';
7878
element.appendChild(element.resizeSensor);
7979

80-
if ('absolute' !== getComputedStyle(element, 'position')) {
80+
if (!{fixed: 1, absolute: 1}[getComputedStyle(element, 'position')]) {
8181
element.style.position = 'relative';
8282
}
8383

0 commit comments

Comments
 (0)