wenliming il y a 3 ans
Parent
commit
d534087244
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

@@ -577,6 +577,7 @@ function addSliderNavDeBtn(isSmall = false) {
 
 function onWindowResize() {
     window.onresize = throttle(function () {
+        setTabGroupIframeStyle();
         try {
             if (tweetPublishStore.showPublishDialog) {
                 let dialog = document.querySelector('div[role="dialog"]');
@@ -1963,7 +1964,9 @@ const addTabGroupContent = () => {
  */
 export const setTabGroupIframeStyle = (params) => {
     let iframeContent = document.getElementById('de-tab-group-content');
-    iframeContent.style.height = document.querySelector('html').offsetHeight + 'px';
+    if(iframeContent) {
+        iframeContent.style.height = document.querySelector('html').offsetHeight + 'px';
+    }
 }
 
 export const pageJumpHandler = (params) => {