Error when iframe closes
See original GitHub issueIn my app when I switch from a page with an iFrame to a new page I am getting a console error
* Uncaught TypeError: Cannot read property 'id' of null
* at onClose (index.es.js:1488)
* at chkEvent (index.es.js:633)
* at closeIFrame (index.es.js:651)
* at eval (index.es.js:1062)
* at Array.forEach (<anonymous>)
* at eval (index.es.js:1060)
* at Array.forEach (<anonymous>)
* at MutationObserver.eval (index.es.js:1058)
The error is thrown here:
[iframeSizerReact][${iframeRef.current.id}] Close event ignored, to remove the iframe update your React component
iframeRef.current is null when this message is attempted.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Error when closing Iframe in IE - javascript - Stack Overflow
It sounds like what you've encountered is a weird corner bug with IE. Basically, if an iframe is in another element, in certain...
Read more >394431 - window.close() does not close iframes
Same code as in initial report. The alert should not be possible if the iframe had closed (and also, the iframe should no...
Read more ><iframe> not closing . .? - HTML & CSS - SitePoint
This error usually indicates that you have failed to add a closing quotation mark on a previous attribute value (so the attribute value...
Read more >Avoiding Self-Closing IFRAME Tags Using htmlParse() In ...
If I were to try and get the browser to render this iframe , the page would break. It wouldn't throw an error,...
Read more >The ultimate guide to iframes - LogRocket Blog
If a browser does not support an iframe, it will display the content included between the opening <iframe> tag and the closing </iframe>...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry I haven’t responded sooner David.
So I changed to:
warning_1(!iframeRef.current, “[iframeSizerReact][” + iframeRef.current.id + “] Close event ignored, to remove the iframe update your React component”);
This is much better as it just throws a console warning:
“[iFrameSizer][Host page: iFrameResizer0] [Window resize] IFrame(iFrameResizer0) not found”
@ymor, can you create another ticket for that issue please