Update textWysiwyg.tsx

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

View File

@ -543,7 +543,12 @@ export const textWysiwyg = ({
isWritableElement(target);
setTimeout(() => {
editable.onblur = handleSubmit;
editable.onblur = () => {
app.setState({
toastMessage: "debug: onblur",
});
handleSubmit();
};
if (target && isTargetColorPicker) {
target.onblur = () => {
editable.focus();
@ -576,7 +581,7 @@ export const textWysiwyg = ({
isTargetColorPicker
) {
app.setState({
toastMessage: "debug",
toastMessage: "debug: onPointerDown",
});
editable.onblur = null;
window.addEventListener("pointerup", bindBlurEvent);