mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: creating text while color picker open (#6651)
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
This commit is contained in:
parent
ae7ff76126
commit
84bd9bd4ff
4 changed files with 111 additions and 184 deletions
|
@ -60,6 +60,13 @@ export const isInputLike = (
|
|||
target instanceof HTMLTextAreaElement ||
|
||||
target instanceof HTMLSelectElement;
|
||||
|
||||
export const isInteractive = (target: Element | EventTarget | null) => {
|
||||
return (
|
||||
isInputLike(target) ||
|
||||
(target instanceof Element && !!target.closest("label, button"))
|
||||
);
|
||||
};
|
||||
|
||||
export const isWritableElement = (
|
||||
target: Element | EventTarget | null,
|
||||
): target is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue