wenliming il y a 2 ans
Parent
commit
7b66bdf5e9
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  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';
     }
 }