Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ class Grid extends React.Component<
this.gridUpdateTabs = this.updateTabs.bind(this);
this.gridUpdatePostsVisual = this.updatePostsVisual.bind(this);

const viewPort = document.querySelector(".os-viewport");
const viewPort = document.querySelector(".os-viewport") ?? document.querySelector("#main .main-view-container__scroll-node");
this.checkScroll = this.isScrolledBottom.bind(this);
if (viewPort) {
viewPort.addEventListener("scroll", this.checkScroll);
Expand All @@ -522,7 +522,7 @@ class Grid extends React.Component<
*/
componentWillUnmount(): void {
this.gridUpdateTabs = this.gridUpdatePostsVisual = null;
const viewPort = document.querySelector(".os-viewport");
const viewPort = document.querySelector(".os-viewport") ?? document.querySelector("#main .main-view-container__scroll-node");
if (viewPort) {
this.lastScroll = viewPort.scrollTop;
viewPort.removeEventListener("scroll", this.checkScroll);
Expand Down
2 changes: 1 addition & 1 deletion src/components/TabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const TopBarContent = (props: {
activeLink: string;
switchCallback: (option: Option) => void;
}) => {
const resizeHost = document.querySelector(".Root__main-view .os-resize-observer-host");
const resizeHost = document.querySelector(".Root__main-view .os-resize-observer-host") ?? document.querySelector(".Root__main-view .os-size-observer");
if (!resizeHost) return null;

const [windowSize, setWindowSize] = useState(resizeHost.clientWidth);
Expand Down