fix menu closing and reopening on iphone.