You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typing specific characters (eg "g") in a text field triggers shortcuts
Example:
i was trying to add a stage in opportunities ("Contacting") but can't type the "g" + if I type eg "t" after typing "g", i'm redirected to that tasks screen
screen:
https://github.com/twentyhq/twenty/assets/53276986/b038280b-ac0a-42c1-a6fa-122f3cd6d203
Expected behavior
i can type my text without triggering shortcuts when focus is on text input field / can trigger shortcuts when no focus is on text input field
The text was updated successfully, but these errors were encountered:
To resolve the issue where typing in a text input field triggers shortcuts, follow these steps:
Locate the TextInput component: This is likely where the focus handling should be adjusted.
Modify the TextInput component to set the hotkey scope when the input field is focused. You can use the InputHotkeyScope enum to manage this.
Example Code:
import{InputHotkeyScope}from'path/to/InputHotkeyScope';classTextInputextendsReact.Component{handleFocus=()=>{// Set the hotkey scope to deactivate shortcutsInputHotkeyScope.setScope('textInput');};handleBlur=()=>{// Revert the hotkey scope to its previous stateInputHotkeyScope.revertScope();};render(){return(<inputtype="text"onFocus={this.handleFocus}onBlur={this.handleBlur}{...this.props}/>);}}
Ensure InputHotkeyScope is properly implemented to manage the scope stack and deactivate shortcuts when the scope is set to textInput.
This should prevent shortcuts from being triggered when typing in a text input field.
Bug Description
typing specific characters (eg "g") in a text field triggers shortcuts
Example:
Expected behavior
i can type my text without triggering shortcuts when focus is on text input field / can trigger shortcuts when no focus is on text input field
The text was updated successfully, but these errors were encountered: