Focus the drawer's search and raise the keyboard when the drawer opens

Swiping down to the app drawer puts the cursor in its search box. A WebView
won't show the keyboard for a script focus(), so the shell does it through
new Android.showKeyboard/hideKeyboard bridge calls; closing the drawer hides
it again. Pick mode (adding apps) stays keyboard-free.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169wSWnZqnXBsJKMPAiCCNG
This commit is contained in:
Claude committed 2026-10-21 23:54:41 +00:00
1 parent ce815d72c2
commit be2371deb0
3 files changed
+39 -1

No files matched your search

+1
View File
@@ -77,6 +77,7 @@ const BASE = process.env.BASE || "http://localhost:8000";
await swipe(200, 500);
await p.waitForSelector(".drawer", { timeout: 2000 });
assert.equal(await p.$$eval("[data-wid]", (ws) => ws.length), 0);
assert.ok(await p.$eval(".drawer input", (i) => i === document.activeElement), "opening the drawer focuses its search");
await p.fill(".drawer input", "ma"); await settle();
assert.deepEqual(await p.$$eval(".apps .name", (ns) => ns.map((n) => n.textContent)), ["Gmail", "Maps"]);
await p.press(".drawer input", "Enter"); await settle();