From d0f3fa08b49eb9ce2035fc16ba7f481107467fe1 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 9 Aug 2024 14:41:01 +0200 Subject: [PATCH] UX: don't automatically close a question anymore if the tagsStore was pinged, see #2071 --- .../TagRendering/TagRenderingEditable.svelte | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/UI/Popup/TagRendering/TagRenderingEditable.svelte b/src/UI/Popup/TagRendering/TagRenderingEditable.svelte index 574e9a357..08cfa85d4 100644 --- a/src/UI/Popup/TagRendering/TagRenderingEditable.svelte +++ b/src/UI/Popup/TagRendering/TagRenderingEditable.svelte @@ -27,11 +27,24 @@ * Indicates if this tagRendering currently shows the attribute or asks the question to _change_ the property */ export let editMode = !config.IsKnown(tags.data) + let knownAtTheStart = config.IsKnown(tags.data) if (tags) { onDestroy( tags.addCallbackD((tags) => { - editMode = !config.IsKnown(tags) - }) + const knownNow = config.IsKnown(tags) + if(!knownNow){ + editMode = true + return + } + if(knownNow && !knownAtTheStart) { + // Some other question might have set this to 'known', so we close the 'editMode' + editMode = false + + // well, not really 'known at the start', but it is known at this point in time, so it should not set 'editMode' to false automatically anymore + knownAtTheStart = true + } + + }), ) }