Update textWysiwyg.tsx

This commit is contained in:
zsviczian 2022-03-13 22:49:14 +01:00 committed by GitHub
parent 158f169c43
commit 9a66fc6c05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -542,8 +542,19 @@ export const textWysiwyg = ({
target.closest(".color-picker-input") && target.closest(".color-picker-input") &&
isWritableElement(target); isWritableElement(target);
const isShapeActionsPanel =
(event.target instanceof HTMLElement ||
event.target instanceof SVGElement) &&
(event.target.closest(`.${CLASSES.SHAPE_ACTIONS_MENU}`) ||
event.target.closest(`.${CLASSES.SHAPE_ACTIONS_MOBILE_MENU}`) ||
event.target.closest(`.${CLASSES.MOBILE_TOOLBAR}`)) &&
!isWritableElement(event.target);
setTimeout(() => { setTimeout(() => {
editable.onblur = () => { editable.onblur = () => {
if (isShapeActionsPanel) {
return;
}
app.setState({ app.setState({
toastMessage: "debug: onblur", toastMessage: "debug: onblur",
}); });