Skip to content

Commit 805dd75

Browse files
committed
fix: stop rte update if editor focused in e2e test
1 parent 34ce1cf commit 805dd75

File tree

1 file changed

+3
-1
lines changed
  • packages/frontend/src/components/RichTextEditor

1 file changed

+3
-1
lines changed

packages/frontend/src/components/RichTextEditor/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ const Editor = ({
220220
// NOTE: we force a re-render editor content when variable info changes (e.g., after step reorder)
221221
// to ensure that the variable shown in the RTE is updated
222222
useEffect(() => {
223-
if (!editor || !content) {
223+
// HACKFIX (kevinkim-ogp): this prevents the editor from updating during e2e tests
224+
// when playwright is typing in the editor
225+
if (!editor || !content || editor.isFocused) {
224226
return
225227
}
226228

0 commit comments

Comments
 (0)