From: Thomas Lamprecht Date: Tue, 28 Mar 2023 15:47:34 +0000 (+0200) Subject: window: ldap auth edit: set view-model form data explicitly on edit X-Git-Url: https://git.proxmox.com/?p=proxmox-widget-toolkit.git;a=commitdiff_plain;h=4d3a18dfc3a37520f0eb82fec120fcc0da625583 window: ldap auth edit: set view-model form data explicitly on edit Fix a race that shows up in chrome/chromium by setting the data in the view-model that is binded to form fields explicitly on edit, this avoids a race where the default declared in the viewModel data got applied after the form data was set, thus having the state out of sync and so marking the field potentially as dirty even if it wasn't. Reported-by: Dominik Csapak Signed-off-by: Thomas Lamprecht --- diff --git a/src/window/AuthEditLDAP.js b/src/window/AuthEditLDAP.js index 43d2234..cae7c80 100644 --- a/src/window/AuthEditLDAP.js +++ b/src/window/AuthEditLDAP.js @@ -57,7 +57,9 @@ Ext.define('Proxmox.panel.LDAPInputPanel', { }, onSetValues: function(values) { + let me = this; values.anonymous_search = values["bind-dn"] ? 0 : 1; + me.getViewModel().set('anonymous_search', values.anonymous_search); return values; },