Admin UI: Cannot save immediately after changing value

Issue Description

The [Save] button gets enabled only on blur, not on input

Expected Behavior

After changing a value, I can click [Save]

Actual Behavior

After changing a value, I need to click elsewhere (into any other input field, or into an empty part of the page). Only then does the [Save] button get enabled.

Reproduction Steps

  1. Go to any setting
  2. Change the value
  3. Try to click [Save]

Stalwart Version

v0.16.x

Installation Method

Docker

Database Backend

RocksDB

Blob Storage

RocksDB

Search Engine

Internal

Directory Backend

Internal

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

This is a confirmed UI bug in the WebUI where the Save button’s enabled state is bound to the blur event on input fields rather than the input/change event. Let me verify what’s in the source.

This confirms the root cause. The BufferedInput component in FieldWidget.tsx uses a local state and only calls onCommit (which propagates the change upward and enables Save) on onBlur – i.e., when the input loses focus. Clicking Save directly after typing never triggers the blur event in time, so the button remains disabled.

This is a confirmed UI bug in the WebUI. The BufferedInput component keeps a local copy of the value and only commits it to the form state on blur (focus leaving the field) or on pressing Enter. When you click the Save button immediately after typing, the blur event fires too late (or not at all before the click is processed), so the form never registers the change and the Save button stays disabled.

The workaround you already found is correct: click anywhere else on the page first to trigger the blur, then click Save.

A fix would require either:

  • Flushing the buffered value to form state on every onChange (removing the buffer), or
  • Committing the buffered value when the Save button receives focus/mousedown.

Since this is a WebUI source issue, a human maintainer will need to address it in src/components/forms/FieldWidget.tsx.

This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong. If you found it useful, mention @helpbot in any reply to ask follow-up questions and the bot will respond again.