From a396e0df26e25e1c09fe5b1e836ca599f086097e Mon Sep 17 00:00:00 2001 From: AgentConDier Date: Sun, 29 Oct 2023 10:39:30 +0100 Subject: [PATCH] WebUI: Fix duplicate scrollbar on Transfer List The overlay scrollbars introduced in Firefox 100 take up no space, breaking the existing overflow detection. Add an extra check for `scrollHeight != clientHeight` which is able to detect an overflow independent of scrollbar style. PR #19779. --------- Co-authored-by: Chocobo1 --- src/webui/www/private/scripts/dynamicTable.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index c997446d6..7cd5591ea 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -111,7 +111,8 @@ window.qBittorrent.DynamicTable = (function() { let n = 2; - while (panel.clientWidth != panel.offsetWidth && n > 0) { // is panel vertical scrollbar visible ? + // is panel vertical scrollbar visible or does panel content not fit? + while (((panel.clientWidth != panel.offsetWidth) || (panel.clientHeight != panel.scrollHeight)) && (n > 0)) { --n; h -= 0.5; $(this.dynamicTableDivId).style.height = h + 'px';