Skip to content

Commit e932ca1

Browse files
committed
fix: take NotificationBar's height into account
This fixes multiple offset bugs in Sidebar._recalculate, one with the advertisement and one with the actual sidebar on scroll.
1 parent 3b4c7bc commit e932ca1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/sidebar/sidebar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default class Sidebar extends Component {
8989
let { scrollHeight } = document.body;
9090
let { offsetHeight: sidebarHeight } = this._container;
9191
let { offsetWidth: parentWidth, offsetHeight: parentHeight } = this._container.parentNode;
92-
let headerHeight = document.querySelector('header').offsetHeight;
92+
let headerHeight = document.querySelector('header').offsetHeight + document.querySelector('.notification-bar').offsetHeight;
9393
let footerHeight = document.querySelector('footer').offsetHeight;
9494
let distToBottom = scrollHeight - scrollY - innerHeight;
9595

0 commit comments

Comments
 (0)