File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -498,7 +498,7 @@ class Grid extends React.Component<
498
498
this . gridUpdateTabs = this . updateTabs . bind ( this ) ;
499
499
this . gridUpdatePostsVisual = this . updatePostsVisual . bind ( this ) ;
500
500
501
- const viewPort = document . querySelector ( ".os-viewport" ) ;
501
+ const viewPort = document . querySelector ( ".os-viewport" ) ?? document . querySelector ( "#main .main-view-container__scroll-node" ) ;
502
502
this . checkScroll = this . isScrolledBottom . bind ( this ) ;
503
503
if ( viewPort ) {
504
504
viewPort . addEventListener ( "scroll" , this . checkScroll ) ;
@@ -522,7 +522,7 @@ class Grid extends React.Component<
522
522
*/
523
523
componentWillUnmount ( ) : void {
524
524
this . gridUpdateTabs = this . gridUpdatePostsVisual = null ;
525
- const viewPort = document . querySelector ( ".os-viewport" ) ;
525
+ const viewPort = document . querySelector ( ".os-viewport" ) ?? document . querySelector ( "#main .main-view-container__scroll-node" ) ;
526
526
if ( viewPort ) {
527
527
this . lastScroll = viewPort . scrollTop ;
528
528
viewPort . removeEventListener ( "scroll" , this . checkScroll ) ;
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export const TopBarContent = (props: {
71
71
activeLink : string ;
72
72
switchCallback : ( option : Option ) => void ;
73
73
} ) => {
74
- const resizeHost = document . querySelector ( ".Root__main-view .os-resize-observer-host" ) ;
74
+ const resizeHost = document . querySelector ( ".Root__main-view .os-resize-observer-host" ) ?? document . querySelector ( ".Root__main-view .os-size-observer" ) ;
75
75
if ( ! resizeHost ) return null ;
76
76
77
77
const [ windowSize , setWindowSize ] = useState ( resizeHost . clientWidth ) ;
You can’t perform that action at this time.
0 commit comments