Update textWysiwyg.tsx

This commit is contained in:
zsviczian 2022-03-13 23:04:22 +01:00 committed by GitHub
parent d969849357
commit b610c04481
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -541,10 +541,9 @@ export const textWysiwyg = ({
target instanceof HTMLInputElement && target instanceof HTMLInputElement &&
target.closest(".color-picker-input") && target.closest(".color-picker-input") &&
isWritableElement(target); isWritableElement(target);
const isShapeActionsPanel = const isShapeActionsPanel =
(target instanceof HTMLElement || (target instanceof HTMLElement || target instanceof SVGElement) &&
target instanceof SVGElement) &&
(target.closest(`.${CLASSES.SHAPE_ACTIONS_MENU}`) || (target.closest(`.${CLASSES.SHAPE_ACTIONS_MENU}`) ||
target.closest(`.${CLASSES.SHAPE_ACTIONS_MOBILE_MENU}`) || target.closest(`.${CLASSES.SHAPE_ACTIONS_MOBILE_MENU}`) ||
target.closest(`.${CLASSES.MOBILE_TOOLBAR}`)) && target.closest(`.${CLASSES.MOBILE_TOOLBAR}`)) &&