More elegant way to test dropdown position and fix it (using dropdown events)