From 061f79c473c68764235b793f63e6fdb9c4998313 Mon Sep 17 00:00:00 2001 From: Pabloader Date: Thu, 19 Mar 2026 16:21:54 +0000 Subject: [PATCH] ContentEditable fixes --- src/common/components/ContentEditable.tsx | 1 - src/games/storywriter/assets/editor.module.css | 10 +++++++--- src/games/storywriter/components/editor.tsx | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/common/components/ContentEditable.tsx b/src/common/components/ContentEditable.tsx index 1f61fde..8a79cc4 100644 --- a/src/common/components/ContentEditable.tsx +++ b/src/common/components/ContentEditable.tsx @@ -98,7 +98,6 @@ export const ContentEditable = ({ value, onInput, ...props }: Props) => {
{ } const handleInput = (e: Event) => { - const text = (e.target as HTMLElement).textContent; + const text = (e.target as HTMLElement).textContent || ''; dispatch({ type: 'EDIT_STORY', id: currentStory.id,