浏览代码

[edit] style

wenliming 3 年之前
父节点
当前提交
d534087244
共有 1 个文件被更改,包括 4 次插入1 次删除
  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) => {