mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-12-01 10:07:52 +01:00
fix: don't allow whitespaces for bound text (#5939)
* fix: don't allow whitespaces for bound text * fix * remove * remove empty else * fix * fix * fix
This commit is contained in:
@@ -10,8 +10,8 @@ import { isBoundToContainer, isTextElement } from "./typeChecks";
|
||||
import { CLASSES, BOUND_TEXT_PADDING, VERTICAL_ALIGN } from "../constants";
|
||||
import {
|
||||
ExcalidrawElement,
|
||||
ExcalidrawTextElement,
|
||||
ExcalidrawLinearElement,
|
||||
ExcalidrawTextElement,
|
||||
} from "./types";
|
||||
import { AppState } from "../types";
|
||||
import { mutateElement } from "./mutateElement";
|
||||
@@ -510,7 +510,7 @@ export const textWysiwyg = ({
|
||||
|
||||
if (container) {
|
||||
text = updateElement.text;
|
||||
if (editable.value) {
|
||||
if (editable.value.trim()) {
|
||||
const boundTextElementId = getBoundTextElementId(container);
|
||||
if (!boundTextElementId || boundTextElementId !== element.id) {
|
||||
mutateElement(container, {
|
||||
|
||||
Reference in New Issue
Block a user