* [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
0 siblings, 0 replies; only message 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] only message in thread
only message in thread, other threads:[~2025-08-13 11:10 UTC | newest]
Thread overview: (only message) (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
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.