Skip to content

Commit 3135197

Browse files
authored
fix(theme-picker): ensure color input is updated correctly in updateColors function (@raaid3) (monkeytypegame#6678)
### Description The input of type color doesn't properly get updated when the text input for setting a custom color is modified with a value. Video: https://github.com/user-attachments/assets/87bcc3fd-a71c-460f-adb6-94945efb8b1f
1 parent 0f4d311 commit 3135197

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

frontend/src/ts/elements/settings/theme-picker.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ function updateColors(
5959
}
6060
colorPicker.find("input.input").val(color);
6161
colorPicker.find("input.color").attr("value", color);
62+
colorPicker.find("input.color").val(color);
6263
return;
6364
}
6465
const colorREGEX = [
@@ -114,6 +115,7 @@ function updateColors(
114115
}
115116
colorPicker.find("input.input").val(color);
116117
colorPicker.find("input.color").attr("value", color);
118+
colorPicker.find("input.color").val(color);
117119
}
118120

119121
export async function refreshPresetButtons(): Promise<void> {

0 commit comments

Comments
 (0)