Closed ali-sao closed 2 years ago
Similar to #97
Coordinates are calculated within one layer, so absolutely positioned elements are not recognizable. Coordinates system only works in 2 dimensions, and it's not something that would change in a foreseeable future :)
However for such cases, we figured few workarounds that might help:
1) Position your Menu outside of the screen by having its coordinate to be like -200
. Then add the same amount to the translateX
style. This will move the element in the position where it doesn't overlap anymore, but it will keep it on the same place visually due to translate
not affecting real coordinates.
Thank you.
The case actually is an expandable menu that grows on focus or hover. I
figured out a way though. beside, modifying your layoutMeasurer to
use getBoundingClientRect
Closing as issue seems to have been resolved through workaround.
In case of items/layout collision, focus gets lost Usually noticeable when using absolute positioning with expandable containers
To Reproduce
@asgvard Here's an example