Closed charlieTheBotDev closed 4 years ago
Hi
This issue is caused by using position: absolute; bottom: **px
instead of position: absolute; top: **px
for dropdown positioning.
bottom
positioning shouldn't be used because resizing window or changing viewport orientation changes dropdown position.
Removing:
if direction is 'up'
yPos = 'bottom'
y = document.body.clientHeight - y - dropdownRect.height
fixes flaky BackstopJS tests.
Context
When opening a dropdown for the first time it sometimes displays in an incorrect position.
Steps to Reproduce
Unable to reliably reproduce, except with some screenshot testing (which is difficult to debug)
Your Environment