mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-02-13 16:13:24 +01:00
fix editable active element textarea check
This commit is contained in:
parent
e949a5ea6f
commit
a91acbd672
1 changed files with 2 additions and 2 deletions
|
@ -6,10 +6,10 @@ export const targetFromEvent = (evt: Event, selector: string): Element | undefin
|
|||
export const editableActiveElement = (): boolean =>
|
||||
!!document.activeElement &&
|
||||
(document.activeElement.nodeName.toLowerCase() === 'input' ||
|
||||
document.activeElement.nodeName.toLowerCase() === 'textbox' ||
|
||||
document.activeElement.nodeName.toLowerCase() === 'textarea' ||
|
||||
document.activeElement.getAttribute('contenteditable') === 'true' ||
|
||||
document.activeElement.getAttribute('role') === 'input' ||
|
||||
document.activeElement.getAttribute('role') === 'textbox');
|
||||
document.activeElement.getAttribute('role') === 'textarea');
|
||||
|
||||
export const isIntersectingScrollView = (
|
||||
scrollElement: HTMLElement,
|
||||
|
|
Loading…
Reference in a new issue