ISSUE-838 Keyboard navigation: people search + enter should not open create modal (#839)
This commit is contained in:
@@ -183,7 +183,7 @@ export const PeopleSearch: React.FC<PeopleSearchProps> = ({
|
||||
const handleEnterKey = (
|
||||
e: React.KeyboardEvent<HTMLInputElement>
|
||||
): void => {
|
||||
if (e.key === 'Enter' && onToggleEventPreview) {
|
||||
if (e.key === 'Enter' && onToggleEventPreview && !isOpen) {
|
||||
e.preventDefault()
|
||||
onToggleEventPreview()
|
||||
}
|
||||
@@ -246,7 +246,8 @@ export const PeopleSearch: React.FC<PeopleSearchProps> = ({
|
||||
onToggleEventPreview,
|
||||
loading,
|
||||
searchPlaceholder,
|
||||
handlePaste
|
||||
handlePaste,
|
||||
isOpen
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user