Open qingxiang-jia opened 5 years ago
Same problem. I researched problem and find out the reason. In FF the next string return false:
const supportsPE = document.documentMode < 11 && 'pointerEvents' in frame.style;
because document.documentMode is undefined
so supportsPE == false and string added 'visibility:hidden;'
frame.style.cssText =
${CSS}${supportsPE ? '' : 'visibility:hidden;'};
And we get problem, which was resolved here https://github.com/developit/simple-element-resize-detector/issues/6
I understand that at this point, this project seems to be no longer maintained. But I just want to point out, the code seems only work in Chrome (8/2019), which makes it a bit pointless because Chrome natively supports ResizeObserver. Firefox 68 and Edge (the non-chromium one) currently doesn't support ResizeObserver and this workaround also doesn't work with the two browsers. Here is my code in case I used in incorrectly: