iOS Safari scrolls down when interacting with video.js player

非 Y 不嫁゛ 提交于 2019-12-08 19:55:46

问题


Safari on iOS (10.3) jumping (scrolls down) when closing video.js player popup menu by clicking on menu button the second time.

How to reproduce:

  1. https://codepen.io/mkhazov/full/PjBJvb/. Open this pen in Safari on iPhone or xcode simulator.
  2. Scroll down-up
  3. Click on quality selection button
  4. Click it again.

recorded video: http://www.screencast.com/t/IPkjEo2dxW7

It's definitely mobile Safari bug (there's no js code responsible for scroll), but I can't find the suitable workaround.

This can be fixed by following CSS as proposed here:

html,
body {
  height: 100%;
  -webkit-overflow-scrolling: touch;
  overflow: auto;
}

but it breaks other things (e.g. window.scrollY / $(window).scrollTop()) so I can't use it.

Any ideas/suggestions would be appreciated.

来源:https://stackoverflow.com/questions/44954374/ios-safari-scrolls-down-when-interacting-with-video-js-player

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