public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-widget-toolkit 1/3] fix #5588: notification: smtp: fix 'Authenticate' checkbox in Chromium
Date: Fri, 27 Jun 2025 14:13:37 +0200	[thread overview]
Message-ID: <20250627121339.182283-1-l.wagner@proxmox.com> (raw)

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


             reply	other threads:[~2025-06-27 12:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-27 12:13 Lukas Wagner [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250627121339.182283-1-l.wagner@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal