public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit 3/3] ui: logpanel: work around browser 'setTimeout' quirks
Date: Tue, 23 Nov 2021 08:49:35 +0100	[thread overview]
Message-ID: <20211123074935.736530-4-d.csapak@proxmox.com> (raw)
In-Reply-To: <20211123074935.736530-1-d.csapak@proxmox.com>

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@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





      parent reply	other threads:[~2021-11-23  7:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23  7:49 [pve-devel] [PATCH widget-toolkit 0/3] improve logpanel behaviour for fast tasks Dominik Csapak
2021-11-23  7:49 ` [pve-devel] [PATCH widget-toolkit 1/3] ui: logpanel: fix glitching on fast task logs Dominik Csapak
2021-11-23  7:49 ` [pve-devel] [PATCH widget-toolkit 2/3] ui: logpanel: catch up to very fast task logs with api calls Dominik Csapak
2021-11-23  7:49 ` Dominik Csapak [this message]

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=20211123074935.736530-4-d.csapak@proxmox.com \
    --to=d.csapak@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal