Fix focus in front components inputs (#20961)

Fixes https://github.com/twentyhq/twenty/issues/20714

Fixes keyboard hotkey conflicts when typing inside `<input>` /
`<textarea>` elements rendered by Front Components. Editable fields
rendered through the component renderer now properly push/pop a focus
item onto Twenty's focus stack, disabling global keyboard hotkeys while
the user is typing.

## Before


https://github.com/user-attachments/assets/2003c2cb-2698-480f-aedf-bb2f30396572


## After


https://github.com/user-attachments/assets/2c7c6cb0-ecd7-4557-a77b-4d1f264345f0
This commit is contained in:
Raphaël Bosi
2026-05-27 18:30:49 +02:00
committed by GitHub
parent fbae66de8a
commit c8b9dace72
8 changed files with 250 additions and 8 deletions
@@ -0,0 +1,6 @@
import { createContext } from 'react';
export type SetEditableFocused = (focused: boolean) => void;
export const FrontComponentInputFocusContext =
createContext<SetEditableFocused | null>(null);