Skip to content

Commit b56b185

Browse files
committed
Fix issue preventing text code forms from updating correctly if text contained both goto and input codes
1 parent 4b29b38 commit b56b185

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/ui/form/DialogueTextarea.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ const DialogueTextareaWrapper = styled.div<DialogueTextareaWrapperProps>`
159159
}
160160
}
161161
162-
.Mentions__TokenGoto {
162+
.Mentions__TokenGoto,
163+
.Mentions__TokenInput {
163164
position: relative;
164165
z-index: 1;
165166
cursor: pointer;
@@ -722,7 +723,7 @@ export const DialogueTextarea: FC<DialogueTextareaProps> = ({
722723
const [offsetX, offsetY] = extractGotoCoords(code);
723724
return `${code[3] === "3" ? "P" : "M"}(${
724725
code[3] === "3" || offsetX < 0 ? offsetX : `+${offsetX}`
725-
},${code[3] === "3" || offsetY < 0 ? offsetY : `+${offsetY}`})`;
726+
}${code[3] === "3" || offsetY < 0 ? offsetY : `+${offsetY}`})`;
726727
}}
727728
hoverTransform={(code) =>
728729
code[3] === "3"
@@ -751,14 +752,14 @@ export const DialogueTextarea: FC<DialogueTextareaProps> = ({
751752
isLoading={false}
752753
/>
753754
<CustomMention
754-
className="Mentions__TokenGoto"
755+
className="Mentions__TokenInput"
755756
trigger={/(!([\p{L}0-9]+))$/u}
756757
data={searchWaitCodes}
757758
markup={`__id__`}
758759
regex={/(\\006\\[0-7][0-7][0-7])/}
759760
displayTransform={(code: string) => {
760761
const buttons = extractInputMask(code);
761-
return `W(${buttons.join()})`;
762+
return `W(${buttons.join("﹐")})`;
762763
}}
763764
hoverTransform={(_code: string) =>
764765
l10n("FIELD_WAIT_UNTIL_BUTTON_PRESSED")

0 commit comments

Comments
 (0)