fix(mobile): keep keyboard focus taps non-activating

This commit is contained in:
lior
2026-08-10 13:21:15 +03:00
parent 752374abc7
commit b01ed611c4
3 changed files with 71 additions and 4 deletions
+10 -2
View File
@@ -756,12 +756,16 @@ describe('Virtual Keyboard', () => {
it('focuses the terminal helper textarea when the terminal is tapped', async () => {
await page.evaluate(() => {
window.__sentInputs = [];
app.activeSessionId = 'mobile-focus-visible-input-test';
app.sessions.set('mobile-focus-visible-input-test', {
id: 'mobile-focus-visible-input-test',
mode: 'codex',
status: 'running',
});
app._sendInputAsync = (_sessionId: string, input: string) => {
window.__sentInputs.push(input);
};
app.hideWelcome();
const settings = app.loadAppSettingsFromStorage();
settings.cjkInputEnabled = false;
@@ -771,8 +775,12 @@ describe('Virtual Keyboard', () => {
await page.locator('#terminalContainer').tap({ position: { x: 40, y: 40 } });
const activeClass = await page.evaluate(() => document.activeElement?.className);
expect(activeClass).toContain('xterm-helper-textarea');
const state = await page.evaluate(() => ({
activeClass: document.activeElement?.className,
sentInputs: window.__sentInputs,
}));
expect(state.activeClass).toContain('xterm-helper-textarea');
expect(state.sentInputs).toEqual([]);
});
// Regression guard for the phone-keyboard blocker reduced in #173 and re-hit