fix the delay when expanding the menu