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:
parent
83dd55e038
commit
0e41a78c44
2 changed files with 2 additions and 2 deletions
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Reference in a new issue