[pve-devel] [PATCH proxmox-widget-toolkit 1/3] fix #5588: notification: smtp: fix 'Authenticate' checkbox in Chromium

Lukas Wagner l.wagner at proxmox.com
Fri Jun 27 14:13:37 CEST 2025


When editing an SMTP endpoint that has no authentication settings, in
Chromium-based browsers, the 'Authenticate' checkbox was ticked because
of a race condition between the view-model default and the InputPanel
logic setting the existing values for the endpoint. Explicitly setting
the value in the view model in onSetValues seems to fix this reliably.

Tested on:
  - Firefox 140
  - Chromium 137
  - Chrome 138
  - Gnome Web (Webkit-based) 48

Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
 src/panel/SmtpEditPanel.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/panel/SmtpEditPanel.js b/src/panel/SmtpEditPanel.js
index df6e3b7..fd10b54 100644
--- a/src/panel/SmtpEditPanel.js
+++ b/src/panel/SmtpEditPanel.js
@@ -196,10 +196,17 @@ Ext.define('Proxmox.panel.SmtpEditPanel', {
     },
 
     onSetValues: function (values) {
+        let me = this;
+
         values.authentication = !!values.username;
         values.enable = !values.disable;
         delete values.disable;
 
+        // Fix race condition in chromium-based browsers. Without this, the
+        // 'Authenticate' remains ticked (the default value) if loading an
+        // SMTP target without authentication.
+        me.getViewModel().set('authentication', values.authentication);
+
         return values;
     },
 });
-- 
2.39.5





More information about the pve-devel mailing list