fix(xgplayer): 修复全屏退出后恢复页面滚动不生效的问题

This commit is contained in:
legolaserea 2024-11-22 22:22:05 +08:00
parent 67194eec64
commit 92db2fc65a

View File

@ -1803,7 +1803,7 @@ class Player extends MediaProxy {
const { _fullScreenOffset, config } = this
if (config.needFullscreenScroll) {
// 保证页面scroll的情况下退出全屏 页面回到原位置
window.scrollTo(_fullScreenOffset.left, _fullScreenOffset.top)
document.documentElement.scrollTo(_fullScreenOffset.left, _fullScreenOffset.top)
Util.setTimeout( this, () => {
this.fullscreen = false
this._fullScreenOffset = null