ISSUE-838 Keyboard navigation: people search + enter should not open create modal (#839)

This commit is contained in:
Benoit TELLIER
2026-04-28 07:57:22 +02:00
committed by GitHub
parent 0f69288355
commit 191296346e
+3 -2
View File
@@ -183,7 +183,7 @@ export const PeopleSearch: React.FC<PeopleSearchProps> = ({
const handleEnterKey = ( const handleEnterKey = (
e: React.KeyboardEvent<HTMLInputElement> e: React.KeyboardEvent<HTMLInputElement>
): void => { ): void => {
if (e.key === 'Enter' && onToggleEventPreview) { if (e.key === 'Enter' && onToggleEventPreview && !isOpen) {
e.preventDefault() e.preventDefault()
onToggleEventPreview() onToggleEventPreview()
} }
@@ -246,7 +246,8 @@ export const PeopleSearch: React.FC<PeopleSearchProps> = ({
onToggleEventPreview, onToggleEventPreview,
loading, loading,
searchPlaceholder, searchPlaceholder,
handlePaste handlePaste,
isOpen
] ]
) )