layout-instability icon indicating copy to clipboard operation
layout-instability copied to clipboard

Resolve confusion from equal previous/current rects

Open npm1 opened this issue 4 years ago • 0 comments

Currently, if a node is large enough, it may shift while previous and current rects remain equal. This may happen due to the offset of the element changing. For example, consider an element which is much longer than the viewport height, and consider a completely vertical shift. The element occupies the full viewport vertically before and after the shift. However, there is a shift because the element moved and the content within the element shifted. The API currently will show previous and current rects that are equal, which is confusing. Hence, it would be good to expose something like the offset of the element in order to avoid developer confusion.

npm1 avatar Aug 23 '21 15:08 npm1