question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when iframe closes

See original GitHub issue

In 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:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pieshopcommented, Oct 18, 2019

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”

0reactions
davidjbradshawcommented, Jan 21, 2020

@ymor, can you create another ticket for that issue please

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found