Fix z-index bug on iOS.