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 <Chocobo1@users.noreply.github.com>
This commit is contained in:
AgentConDier 2023-10-29 10:39:30 +01:00 committed by GitHub
parent ee9390fecd
commit bf95eb50da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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