Reputation: 1730
Yesterday I updated Android System WebView to 85.0.4182.81 on Android 10 phone. Before, the touchmove event was firing 100 fps or so, very smooth. Now it is like 3 FPS.
var n = 0;
window.addEventListener('touchmove', function () {
n++;
document.body.textContent = n;
});
Touch and move here
You may not be abble to test snippet here so you can test it here: https://ghost.sk/touch.html Don't test in chrome for android because it has it's own version of webview without this bug. Is there a way to fix this?
Edit: the workaround is first accepted answer but it is a real issue, here is related bugreport: https://bugs.chromium.org/p/chromium/issues/detail?id=1123304
Upvotes: 1
Views: 491
Reputation: 36
After many hours researching, I found a solution (https://bugs.chromium.org/p/chromium/issues/detail?id=1072364):
Try add a preventDefault()
in touchmove
event:
var n = 0;
window.addEventListener('touchmove', function (e) {
n++;
document.body.textContent = n;
e.preventDefault();
}, {passive: false});
Upvotes: 2