Backport commit:ed749928 to fix dropdown menus on mobiles