Skip to content

Commit 12fbad3

Browse files
authored
impr(input-validation): clean preset name input when adding (@byseif21) (monkeytypegame#7703)
`ValidatedHtmlInputElement` would reset its validation status but keep the old text in the input field 1- go to presets 2- click edit from one of the existing ones 3- go back and click add preset 4- notice the edit one's name is there
1 parent b098c9d commit 12fbad3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

frontend/src/ts/elements/input-validation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ export class ValidatedHtmlInputElement<
190190

191191
override setValue(val: string | null): this {
192192
if (val === null) {
193+
super.setValue("");
193194
this.indicator.hide();
194195
this.currentStatus = { status: "checking", success: false };
195196
} else {

0 commit comments

Comments
 (0)