Safari absolute positioned div disappear when scroll

独自空忆成欢 提交于 2019-12-10 10:50:35

问题


I have a sidebar that contains some products filters on an ecommerce website and has an absolute position. It works well on all browsers except for Safari on iPad and iPhone. It randomly disappears when the page scrolls.

I have tried to use the -webkit-transform: translate3d(0, 0, 0); trick as reported in many articles and other "tricks", but nothing works for me.

(iPad Safari scrolling causes HTML elements to disappear and reappear with a delay)

You can see the page at http://www.hardlyeverwornit.com/alexander-mcqueen

The sidebar is visible on mobile and iPad by clicking the REFINE SEARCH button. The class name is new-search-results-filters. At the moment I have removed the tranlate3d ... because it wasn't working.


回答1:


Are you using any resize event to help you doing the position calculation? If yes, be aware that Safari has a identified bug that triggers the resize event randomly while doing scroll. This can mess up your position calculations.



来源:https://stackoverflow.com/questions/37273242/safari-absolute-positioned-div-disappear-when-scroll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!