From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 470481FF183 for ; Wed, 13 Aug 2025 13:10:31 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3174131B5B; Wed, 13 Aug 2025 13:12:07 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Wed, 13 Aug 2025 13:12:04 +0200 Message-Id: <20250813111204.2342612-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.022 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH widget-toolkit] fix #6679: log/journal view: keep x scroll position when updating the scrolling X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" otherwise the refresh logic will 'jump' back to the beginning of the line if the user has scrolled horizontally. Signed-off-by: Dominik Csapak --- should be cherry-pickable for stable-bookworm too if desired src/panel/JournalView.js | 5 +++-- src/panel/LogView.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/panel/JournalView.js b/src/panel/JournalView.js index 71c0f30..45aeda7 100644 --- a/src/panel/JournalView.js +++ b/src/panel/JournalView.js @@ -49,17 +49,18 @@ Ext.define('Proxmox.panel.JournalView', { let me = this; let view = me.getView(); + let scrollX = view.getScrollX() ?? 0; if (!livemode) { setTimeout(function () { view.scrollTo(0, 0); }, 10); } else if (view.scrollToEnd && scrollPos <= 5) { setTimeout(function () { - view.scrollTo(0, Infinity); + view.scrollTo(scrollX, Infinity); }, 10); } else if (!view.scrollToEnd && scrollPosTop < 20 * view.lineHeight) { setTimeout(function () { - view.scrollTo(0, num * view.lineHeight + scrollPosTop); + view.scrollTo(scrollX, num * view.lineHeight + scrollPosTop); }, 10); } }, diff --git a/src/panel/LogView.js b/src/panel/LogView.js index a774178..4e81846 100644 --- a/src/panel/LogView.js +++ b/src/panel/LogView.js @@ -87,7 +87,7 @@ Ext.define('Proxmox.panel.LogView', { if (scrollToBottom) { let scroller = view.getScrollable(); scroller.suspendEvent('scroll'); - view.scrollTo(0, Infinity); + view.scrollTo(view.getScrollX() ?? 0, Infinity); me.updateStart(true); scroller.resumeEvent('scroll'); } -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel