From f97ea89ab23907d108e5016265ea98c6c25b8a36 Mon Sep 17 00:00:00 2001 From: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com> Date: Fri, 13 Nov 2026 20:26:39 +0530 Subject: [PATCH] fix(scrollbar): don't reopen the keyboard when dragging the scrollbar The scrollbar cancelled its touchend. Android WebView shows the keyboard after a cancelled touchend while an editable element has focus, so dragging the scrollbar with the editor focused and the keyboard hidden opened the keyboard again, and the editor then scrolled back to the cursor. Only the mouse path cancels now. The cancelled touchstart already stops the click and page scrolling. Fixes #3058 --- src/components/scrollbar/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/scrollbar/index.js b/src/components/scrollbar/index.js index 5317fb3ca..516fad83c 100644 --- a/src/components/scrollbar/index.js +++ b/src/components/scrollbar/index.js @@ -173,7 +173,10 @@ export default function ScrollBar(options) { * @param {TouchEvent|MouseEvent} e */ function touchEnd(e) { - e.preventDefault(); + // A cancelled touchend makes Android WebView show the keyboard when + // the editor has focus, even after the user hid it (#3058). The + // cancelled touchstart already stops the click and page scrolling. + if (e.type !== "touchend") e.preventDefault(); touchStarted = false; $scrollbar.classList.remove("active"); document.removeEventListener("touchmove", touchMove, config);