From b56b185431323a54836df797245fbcd4dfac72a2 Mon Sep 17 00:00:00 2001 From: Chris Maltby Date: Thu, 7 Nov 2024 15:29:43 +0000 Subject: [PATCH] Fix issue preventing text code forms from updating correctly if text contained both goto and input codes --- src/components/ui/form/DialogueTextarea.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/ui/form/DialogueTextarea.tsx b/src/components/ui/form/DialogueTextarea.tsx index efb746e97..c56411e00 100644 --- a/src/components/ui/form/DialogueTextarea.tsx +++ b/src/components/ui/form/DialogueTextarea.tsx @@ -159,7 +159,8 @@ const DialogueTextareaWrapper = styled.div` } } - .Mentions__TokenGoto { + .Mentions__TokenGoto, + .Mentions__TokenInput { position: relative; z-index: 1; cursor: pointer; @@ -722,7 +723,7 @@ export const DialogueTextarea: FC = ({ const [offsetX, offsetY] = extractGotoCoords(code); return `${code[3] === "3" ? "P" : "M"}(${ code[3] === "3" || offsetX < 0 ? offsetX : `+${offsetX}` - },${code[3] === "3" || offsetY < 0 ? offsetY : `+${offsetY}`})`; + }﹐${code[3] === "3" || offsetY < 0 ? offsetY : `+${offsetY}`})`; }} hoverTransform={(code) => code[3] === "3" @@ -751,14 +752,14 @@ export const DialogueTextarea: FC = ({ isLoading={false} /> { const buttons = extractInputMask(code); - return `W(${buttons.join()})`; + return `W(${buttons.join("﹐")})`; }} hoverTransform={(_code: string) => l10n("FIELD_WAIT_UNTIL_BUTTON_PRESSED")