소스 검색

[edit] style

wenliming 2 년 전
부모
커밋
7b66bdf5e9
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      src/logic/content/twitter.js

+ 4 - 1
src/logic/content/twitter.js

@@ -2154,7 +2154,10 @@ const fixProfileTabAutoSwitch = () => {
 export const setTabGroupIframeStyle = (params) => {
     let iframeContent = getGroupTabContentNode();
     if (iframeContent) {
-        iframeContent.style.height = document.querySelector('html').offsetHeight + 'px';
+        let htmlHeight =  document.querySelector('html').offsetHeight;
+        let primaryColumnHeightn = document.querySelector('div[data-testid="primaryColumn"]').offsetHeight;
+        let height = primaryColumnHeightn > htmlHeight ? primaryColumnHeightn : htmlHeight;
+        iframeContent.style.height = height + 'px';
     }
 }