From: Friedrich Weber <f.weber@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit] fix #4612: mobile: avoid crash due to missing getProxy method
Date: Fri, 24 Mar 2023 10:02:30 +0100 [thread overview]
Message-ID: <20230324090230.33803-1-f.weber@proxmox.com> (raw)
A previous commit (51083ee) added an override of the internal ExtJS
method `Ext.data.Store.onProxyLoad` in order to fix a race condition.
This override calls `Operation.getProxy`. However, this method is not
available on Sencha Touch. As a consequence, the mobile UI was broken.
This commit modifies the override such that it has no effect in the
mobile UI.
Fixes: 51083ee54aa98af5a711622e4ed240840dcbbabe
Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
---
src/Utils.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/Utils.js b/src/Utils.js
index 7b7a83a..3200884 100644
--- a/src/Utils.js
+++ b/src/Utils.js
@@ -1483,10 +1483,11 @@ Ext.override(Ext.data.Store, {
// If the store's proxy is changed while it is waiting for an AJAX
// response, `onProxyLoad` will still be called for the outdated response.
// To avoid displaying inconsistent information, only process responses
- // belonging to the current proxy.
+ // belonging to the current proxy. However, do not apply this workaround
+ // to the mobile UI, as Sencha Touch has an incompatible internal API.
onProxyLoad: function(operation) {
let me = this;
- if (operation.getProxy() === me.getProxy()) {
+ if (Proxmox.Utils.toolkit === 'touch' || operation.getProxy() === me.getProxy()) {
me.callParent(arguments);
} else {
console.log(`ignored outdated response: ${operation.getRequest().getUrl()}`);
--
2.30.2
next reply other threads:[~2023-03-24 9:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 9:02 Friedrich Weber [this message]
2023-03-24 9:16 ` Dominik Csapak
2023-03-26 15:58 ` [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=20230324090230.33803-1-f.weber@proxmox.com \
--to=f.weber@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