1
0
Fork 0

fix(core): prevent search button from intercepting browser shortcuts when focused (#2871)

Co-authored-by: Sigmabrogz <sigmabrogz@gmail.com>
Co-authored-by: Dylan Tientcheu <dylan.tientcheu@algolia.com>
This commit is contained in:
Sigmabro 2026-07-02 16:06:33 +05:30 committed by GitHub
parent 83dd55e038
commit 0e41a78c44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -27,7 +27,7 @@ function isEditingContent(event: KeyboardEvent): boolean {
const element = event.composedPath()[0] as HTMLElement;
const tagName = element.tagName;
return element.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA';
return element.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA' || tagName === 'BUTTON';
}
export function useDocSearchKeyboardEvents({

View file

@ -28,7 +28,7 @@ function isEditingContent(event: KeyboardEvent): boolean {
const element = event.composedPath()[0] as HTMLElement;
const tagName = element.tagName;
return element.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA';
return element.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA' || tagName === 'BUTTON';
}
export function useDocSearchKeyboardEvents({