Skip to content

Question menu settings show the old value for 400 ms, and a quick change back is lost #3970

Open

Description

@AndyScherzinger

Please use the 👍 reaction to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

Describe the bug
Settings in a question's menu that are saved as extra settings go through onExtraSettingsChange() in src/composables/useQuestion.ts, which batches them and saves them through a debounced saveExtraSettings() (INPUT_DEBOUNCE_MS, 400 ms). Until that save runs, props.extraSettings still holds the saved value, and the controls are bound to it. This has two effects:

  1. A select such as "Highest rating" (or the lowest/highest value of a linear scale) keeps showing the old value for up to 400 ms after a new one is picked.
  2. Picking the saved value again within those 400 ms is lost: the control's model value already equals the saved value, so no change is emitted, and the pending other value is saved instead.

To Reproduce
Steps to reproduce the behavior:

  1. Edit a form with a rating question (feat(linearscale): rating sub type with stars, hearts or thumbs #3637) or a linear scale.
  2. Open the question's menu and pick another value in the "Highest rating" select, e.g. 7 instead of 10.
  3. Watch the select: it shows 10 at about 300 ms and 7 at about 600 ms.
  4. Pick a value, then pick the previously saved value again within 400 ms: the first pick is saved.

Expected behavior
The control shows the picked value at once, and the last pick is the one saved, however quickly the user changes it.

A possible fix: keep the pending extra settings in a reactive local state that the controls read (saved value merged with pending changes), or flush the pending save before a control that shows the saved value is updated. The fix belongs in useQuestion, as all question types that save extra settings from their menu share this path.

Screenshots
N/A

Nextcloud (please complete the following information):

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Microsoft Edge (Chromium)
  • Version: current

Smartphone (please complete the following information):

N/A

Browser log

No errors are logged; the behaviour follows from the debounce.

Additional context
Found in the review of #3637 (rating question). Validated and reproduced on a live Nextcloud 36 instance with the rating question of #3637: the select timing was measured, and the lost second pick was reproduced for the icon choice before #3637 switched it to @change. The "Highest rating" select is left as is in #3637, as the fix belongs in useQuestion. The linear scale's lowest and highest value selects use the same code path; they were not reproduced separately.

Assisted by Claude Code:claude-opus-5-5

Activity

  1. added
    bugSomething isn't working
    0. Needs triagePending approval or rejection. This issue is pending approval.
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending approval or rejection. This issue is pending approval.bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions