Fix gallery hover flickering on safari