diff --git a/src/app/features/room/RoomView.tsx b/src/app/features/room/RoomView.tsx index 57acb73aa..a07fa6077 100644 --- a/src/app/features/room/RoomView.tsx +++ b/src/app/features/room/RoomView.tsx @@ -51,7 +51,17 @@ const shouldFocusMessageField = (evt: KeyboardEvent): boolean => { code === 'Space' || code === 'Enter' || code === 'NumLock' || - code === 'ScrollLock' + code === 'ScrollLock' || + // Not typing: Escape in particular dismisses popouts, and a focus-trap + // hands focus back to the opener on Escape. Treating it as "start typing" + // yanked focus into the composer instead (#187 DP9: closing the GIF picker + // with Esc left focus in the composer, not on the GIF button). + code === 'Escape' || + code === 'CapsLock' || + code === 'Insert' || + code === 'ContextMenu' || + code === 'PrintScreen' || + code === 'Pause' ) { return false; }