Skip to content

Commit a05d0cf

Browse files
authored
fix: update resizeHost query (#934)
1 parent a58eb33 commit a05d0cf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/components/TabBar.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ export const TopBarContent = (props: {
6060
activeLink: string;
6161
switchCallback: (option: Option) => void;
6262
}) => {
63-
const resizeHost =
64-
document.querySelector(".Root__main-view .os-resize-observer-host") ?? document.querySelector(".Root__main-view .os-size-observer");
63+
const resizeHost = document.querySelector(
64+
".Root__main-view .os-resize-observer-host, .Root__main-view .os-size-observer, .Root__main-view .main-view-container__scroll-node"
65+
);
6566
if (!resizeHost) return null;
6667

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

0 commit comments

Comments
 (0)