[pve-devel] [PATCH widget-toolkit 3/3] ui: logpanel: work around browser 'setTimeout' quirks

Dominik Csapak d.csapak at proxmox.com
Tue Nov 23 08:49:35 CET 2021


for some reason, some browsers omit the scroll event if the 'scrollTo'
was done before layouting in some cases, so manually trigger our 'onScroll'
handler to set the new start parameter alwyas after scrolling

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/panel/LogView.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/panel/LogView.js b/src/panel/LogView.js
index 4a273a1..be3850e 100644
--- a/src/panel/LogView.js
+++ b/src/panel/LogView.js
@@ -67,7 +67,7 @@ Ext.define('Proxmox.panel.LogView', {
 
 	    if (view.scrollToEnd && scrollPos <= 5) {
 		// we use setTimeout to work around scroll handling on touchscreens
-		setTimeout(function() { view.scrollTo(0, Infinity); }, 10);
+		setTimeout(function() { view.scrollTo(0, Infinity); me.onScroll(); }, 10);
 	    }
 	},
 
-- 
2.30.2





More information about the pve-devel mailing list