From d196af0503053d00e05afb8d2585a67b229a5144 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 10 Mar 2026 23:18:07 +0100 Subject: [PATCH] fix: remove debounce from color picker to prevent stale color on save The color picker had a 500ms debounce before propagating the selected color to the parent component. Since all usages save via an explicit button click (not automatically), the debounce only caused a race condition where the model value could be stale when the user clicked Save within 500ms of picking a color. Closes go-vikunja/vikunja#2312 --- frontend/src/components/input/ColorPicker.vue | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/frontend/src/components/input/ColorPicker.vue b/frontend/src/components/input/ColorPicker.vue index 23e0984de..c7128cc97 100644 --- a/frontend/src/components/input/ColorPicker.vue +++ b/frontend/src/components/input/ColorPicker.vue @@ -82,7 +82,6 @@ const DEFAULT_COLORS = [ ] const color = ref('') -const lastChangeTimeout = ref | null>(null) const defaultColors = ref(DEFAULT_COLORS) const colorListID = ref(createRandomID()) @@ -112,13 +111,7 @@ function update(force = false) { return } - if (lastChangeTimeout.value !== null) { - clearTimeout(lastChangeTimeout.value) - } - - lastChangeTimeout.value = setTimeout(() => { - model.value = color.value - }, 500) + model.value = color.value } function reset() {