Skip to content

Commit 378038e

Browse files
Alberto VillaAlberto Villa
authored andcommitted
Make the sensor as big as its parent
There is no need to make the sensor bigger, it won't have to fire any event, it's 'expand' and 'shrink' which have such a need. Having the sensor bigger than its parent would cause the parent(s) to scroll.
1 parent 7504c0f commit 378038e

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
@@ -67,7 +67,7 @@
6767
var style = 'position: absolute; left: 0; top: 0; right: -30px; bottom: -30px; overflow: hidden; z-index: -1; visibility: hidden;';
6868
var styleChild = 'position: absolute; left: 0; top: 0; transition: 0s;';
6969

70-
element.resizeSensor.style.cssText = style;
70+
element.resizeSensor.style.cssText = style + ' right: 0; bottom: 0;';
7171
element.resizeSensor.innerHTML =
7272
'<div class="resize-sensor-expand" style="' + style + '">' +
7373
'<div style="' + styleChild + '"></div>' +

0 commit comments

Comments
 (0)