mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
51efc0765d
no issue There was noticeable flickering as content is loaded into the iframe or re-rendered because we show everything from the moment html is injected in, meaning the full loading and layout process is shown. - changed to using two iframes with one being hidden - when `@html` changes we inject the html into the hidden iframe - once all loading finishes on the hidden iframe (or 500ms timeout occurs to account for slower connections) we swap the iframe visibility so we end up switching between two fully (mostly) rendered displays resulting in much less flicker
8 lines
337 B
Handlebars
8 lines
337 B
Handlebars
<div
|
|
{{did-insert this.replaceIframeContents}}
|
|
{{did-update this.replaceIframeContents @html}}
|
|
...attributes
|
|
>
|
|
<iframe class="w-100 h-100" {{did-insert this.registerIframe}} {{on "load" this.didLoad}}></iframe>
|
|
<iframe class="w-100 h-100" {{did-insert this.registerIframe}} {{on "load" this.didLoad}}></iframe>
|
|
</div> |