|
@@ -10,8 +10,8 @@ import { isBoundToContainer, isTextElement } from "./typeChecks";
|
|
import { CLASSES, BOUND_TEXT_PADDING, VERTICAL_ALIGN } from "../constants";
|
|
import { CLASSES, BOUND_TEXT_PADDING, VERTICAL_ALIGN } from "../constants";
|
|
import {
|
|
import {
|
|
ExcalidrawElement,
|
|
ExcalidrawElement,
|
|
- ExcalidrawTextElement,
|
|
|
|
ExcalidrawLinearElement,
|
|
ExcalidrawLinearElement,
|
|
|
|
+ ExcalidrawTextElement,
|
|
} from "./types";
|
|
} from "./types";
|
|
import { AppState } from "../types";
|
|
import { AppState } from "../types";
|
|
import { mutateElement } from "./mutateElement";
|
|
import { mutateElement } from "./mutateElement";
|
|
@@ -510,7 +510,7 @@ export const textWysiwyg = ({
|
|
|
|
|
|
if (container) {
|
|
if (container) {
|
|
text = updateElement.text;
|
|
text = updateElement.text;
|
|
- if (editable.value) {
|
|
|
|
|
|
+ if (editable.value.trim()) {
|
|
const boundTextElementId = getBoundTextElementId(container);
|
|
const boundTextElementId = getBoundTextElementId(container);
|
|
if (!boundTextElementId || boundTextElementId !== element.id) {
|
|
if (!boundTextElementId || boundTextElementId !== element.id) {
|
|
mutateElement(container, {
|
|
mutateElement(container, {
|