Fixes the dropdown menu briefly appearing in the top-left corner before snapping to the correct position