all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH proxmox-widget-toolkit 1/3] fix #5588: notification: smtp: fix 'Authenticate' checkbox in Chromium
@ 2025-06-27 12:13 Lukas Wagner
  2025-06-27 12:13 ` [pve-devel] [PATCH proxmox-widget-toolkit 2/3] notification: smtp: only show 'Unchanged' in password field when it makes sense Lukas Wagner
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Lukas Wagner @ 2025-06-27 12:13 UTC (permalink / raw)
  To: pve-devel

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@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-07-15 22:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-27 12:13 [pve-devel] [PATCH proxmox-widget-toolkit 1/3] fix #5588: notification: smtp: fix 'Authenticate' checkbox in Chromium Lukas Wagner
2025-06-27 12:13 ` [pve-devel] [PATCH proxmox-widget-toolkit 2/3] notification: smtp: only show 'Unchanged' in password field when it makes sense Lukas Wagner
2025-06-27 12:13 ` [pve-devel] [PATCH proxmox-widget-toolkit 3/3] notification: smtp: don't split translatable string Lukas Wagner
2025-06-27 12:22   ` Maximiliano Sandoval
2025-07-08 17:15 ` [pve-devel] [PATCH proxmox-widget-toolkit 1/3] fix #5588: notification: smtp: fix 'Authenticate' checkbox in Chromium Michael Köppl
2025-07-15 22:34 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal