all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH widget-toolkit] fix #6679: log/journal view: keep x scroll position when updating the scrolling
@ 2025-08-13 11:12 Dominik Csapak
  2025-10-02  9:11 ` [pve-devel] applied: " Fiona Ebner
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2025-08-13 11:12 UTC (permalink / raw)
  To: 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 <d.csapak@proxmox.com>
---
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


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

* [pve-devel] applied: [PATCH widget-toolkit] fix #6679: log/journal view: keep x scroll position when updating the scrolling
  2025-08-13 11:12 [pve-devel] [PATCH widget-toolkit] fix #6679: log/journal view: keep x scroll position when updating the scrolling Dominik Csapak
@ 2025-10-02  9:11 ` Fiona Ebner
  0 siblings, 0 replies; 2+ messages in thread
From: Fiona Ebner @ 2025-10-02  9:11 UTC (permalink / raw)
  To: pve-devel, Dominik Csapak

On Wed, 13 Aug 2025 13:12:04 +0200, Dominik Csapak wrote:
> otherwise the refresh logic will 'jump' back to the beginning of the
> line if the user has scrolled horizontally.

Applied, thanks!

[1/1] fix #6679: log/journal view: keep x scroll position when updating the scrolling
      commit: a1e490a4e2bd6b4254a00c884e5f440ae15dc91f


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


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

end of thread, other threads:[~2025-10-02  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-13 11:12 [pve-devel] [PATCH widget-toolkit] fix #6679: log/journal view: keep x scroll position when updating the scrolling Dominik Csapak
2025-10-02  9:11 ` [pve-devel] applied: " Fiona Ebner

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