Instead of measuring panel height with unreliable RAF timing, use CSS bottom positioning when the button is in the lower half of the viewport. The dropdown grows upward, no measurement needed.
Instead of measuring panel height with unreliable RAF timing, use CSS bottom positioning when the button is in the lower half of the viewport. The dropdown grows upward, no measurement needed.