휴대폰에서 채팅을 보낸 뒤에도 키보드 유지: "보내기" 버튼을 누르면 포커스가 버튼으로 넘어가 입력 칸이 빠지고 키보드가 내려가던 것을, 버튼의 pointerdown/mousedown 기본 동작을 막아(lib/chat-input keepFocus) 포커스를 입력 칸에 두고, 보낸 뒤에도 입력 칸에 포커스를 다시 줌. 방 채팅(ChatPanel)·그림 맞히기·마피아·라이어 게임 채팅 모두. Esc로 빠져나가기와 포커스가 빠질 때 "입력 중" 끄기는 그대로. chat.e2e.ts(휴대폰 시트에서 보내기 탭)와 games.e2e.ts(catchmind·mafia·liar 보내기 버튼)에 확인 추가, docs/07에 한 줄
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -204,7 +204,7 @@ try {
|
||||
await sheet.getByRole('button', { name: '닫기' }).click();
|
||||
});
|
||||
|
||||
await step('휴대폰 채팅 시트: 새 메시지가 와도 입력 칸 포커스(키보드)가 그대로', async () => {
|
||||
await step('휴대폰 채팅 시트: 새 메시지가 와도, 보내기를 눌러도 입력 칸 포커스(키보드)가 그대로', async () => {
|
||||
await b.getByRole('button', { name: /^채팅/ }).click();
|
||||
const sheet = b.getByRole('dialog', { name: '채팅' });
|
||||
const input = sheet.locator('input[aria-label="메시지"]');
|
||||
@@ -220,6 +220,12 @@ try {
|
||||
await input.press('Enter');
|
||||
await sheet.locator('.chat-line', { hasText: '치는 중 계속' }).waitFor();
|
||||
if (!(await input.evaluate((el) => el === document.activeElement))) throw new Error('the chat box lost focus after sending');
|
||||
// Tapping 보내기 (not the keyboard's send key) must not take the focus either, or the phone keyboard drops.
|
||||
await input.pressSequentially('버튼으로 보냄');
|
||||
await sheet.getByRole('button', { name: '보내기' }).tap();
|
||||
await sheet.locator('.chat-line', { hasText: '버튼으로 보냄' }).waitFor();
|
||||
await b.waitForTimeout(150);
|
||||
if (!(await input.evaluate((el) => el === document.activeElement))) throw new Error('the chat box lost focus after tapping 보내기');
|
||||
await sheet.getByRole('button', { name: '닫기' }).click();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user