FriendsOfTYPO3 / rtehtmlarea

Further maintenance of the HTMLArea RTE, previously part of the TYPO3 Core
https://typo3.org/
GNU General Public License v2.0
9 stars 19 forks source link

Editor not loading in Google Chrome v91 #49

Closed bnf closed 3 years ago

bnf commented 3 years ago

Edit works with Google Chrome v90, but is not loading with v91.

Editor is not loading and only shows The editor is being loaded. Please wait....

Error in JavaScript console:

Uncaught TypeError: Cannot read property 'documentElement' of null
    at Iframe.initializeIframe (Iframe.js?bust=945b5ded3bf39bc3ca55d3c98527cc38801fe68c:202)
    at Iframe.render (Iframe.js?bust=945b5ded3bf39bc3ca55d3c98527cc38801fe68c:57)
    at Framework.render (Framework.js?bust=945b5ded3bf39bc3ca55d3c98527cc38801fe68c:75)
    at new Framework (Framework.js?bust=945b5ded3bf39bc3ca55d3c98527cc38801fe68c:45)
    at Editor.createFramework (Editor.js?bust=945b5ded3bf39bc3ca55d3c98527cc38801fe68c:189)
    at Editor.generate (Editor.js?bust=945b5ded3bf39bc3ca55d3c98527cc38801fe68c:175)
    at Editor.js?bust=945b5ded3bf39bc3ca55d3c98527cc38801fe68c:179

iframe.contentDocument is null in the !iframe.contentDocument.documentElement check: https://github.com/FriendsOfTYPO3/rtehtmlarea/blob/b7ba8bf46e0e7266e8b01afe2551de73186f074f/Resources/Public/JavaScript/HTMLArea/Editor/Iframe.js#L202

iframe.contentDocument is probably null because about:blank src is treated as a foreign origin as of Google Chrome v91. I come to that assumption because accessing iframe.contentWindow.document results in that error.

bnf commented 3 years ago

Sorry, didn't test with the BUGFIX in a20e23445ca760ba94ed06dca05266b6e22a25fb