diff options
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/renderer/components/CustomScrollbars.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gui/src/renderer/components/CustomScrollbars.tsx b/gui/src/renderer/components/CustomScrollbars.tsx index 65db8c87fe..45e7ad521d 100644 --- a/gui/src/renderer/components/CustomScrollbars.tsx +++ b/gui/src/renderer/components/CustomScrollbars.tsx @@ -542,8 +542,9 @@ class CustomScrollbars extends React.Component<IProps, IState> { const thumbHeight = this.computeThumbHeight(scrollable); thumb.style.setProperty('height', thumbHeight + 'px'); - // hide thumb when there is nothing to scroll - const canScroll = thumbHeight < scrollable.offsetHeight; + // hide thumb when there is nothing to scroll. We've had issues with scrollHeight being + // off-by-one, to ensure this doesn't happen we subtract 1 here. + const canScroll = thumbHeight < scrollable.offsetHeight - 1; if (this.state.canScroll !== canScroll) { this.setState({ canScroll }); |
