Release Notes / Version 12.2406.4
Table Of ContentsStudio No Longer Uses the Deprecated "unload" Event
Chrome's deprecation of the unload event broke
window and service handling in Studio. Loading Studio logged several
violations of the form
Permissions policy violation: unload is not allowed in this document.,
and window management could fail afterwards — for example, re-opening
the content app from the burger menu after it had been closed ended up
on an about:blank page.
All remaining unload listeners have been removed
from the Studio client:
@coremedia/service-agenthas been updated to 2.1.3, which usespagehide/pageshowinstead ofunload.The connected-window observer no longer registers an
unloadlistener. Its subscription lives as long as the document and is discarded together with the window.IFrameComponentnow observes the teardown of the framed document with apagehidelistener on the framed window, because no unload-like event is ever dispatched at the iframe element.PreviewIFrameBaseis notified explicitly when Studio itself navigates the preview, as the framed preview document is not same-origin and therefore cannot be observed.A new Ext JS override,
com.coremedia.ui.overrides.ElementSuppressUnloadListenerOverride, prevents the Ext JS DOM event publishers and the drag-and-drop manager from registeringunloadlisteners on the window. Their cleanup was only ever required for Internet Explorer 6 to 8; modern browsers release that per-document state on their own.
As a side effect, Studio documents are eligible for the browser's
back/forward cache again, which a single unload
listener would have prevented.
If your own Studio customizations or plugins register
unload listeners, replace them with
pagehide — and with pageshow
where you need to react to a document being restored from the
back/forward cache.
(CMS-31780)


