Closed movedoa closed 6 years ago
Well, this is part of the fix for https://github.com/marcj/css-element-queries/issues/46. Where we execute the init code (set position
on actual element and reset its sensors) when the element becomes visible.
Fixed, will be part of the next version.
OffsetParent is not reliable to check if an element is positioned or not. For example offsetparent is null if the element or any of its parents is display:null. But when the element is shown later on, the resizesensor would still work as expected without changing anything.
I would rather have a non working resizeSensor than a broken layout. There should either be just be a warning (in the console?) or a setting if resizesensor is allowed to modify the style. (or a perfect check ;-) )