提交 901d9e4b 编写于 作者: Q qiang

fix: 修复 disableScrollBounce 频繁调用导致 iOS13 监听 click 失效的问题

上级 fd681970
......@@ -4,6 +4,7 @@ import {
let view
let pullToRefreshStyle
let disabled
const lastAction = {}
export function disableScrollBounce ({
disable
......@@ -22,7 +23,12 @@ export function disableScrollBounce ({
}))
}
}
const time = Date.now()
if (disable === lastAction.disable && time - lastAction.time < 20) {
return
}
lastAction.disable = disable
lastAction.time = time
plusReady(() => {
if (plus.os.name === 'iOS') {
// 延迟执行避免iOS13触摸卡死
......@@ -30,5 +36,5 @@ export function disableScrollBounce ({
} else {
exec()
}
})
}
})
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册