-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gutenberg compatibility issue #806
Labels
Comments
I'm also seeing the same quirks mode issue apply on a site that isn't noticeably displaying that error; in our case, it's the Shortcake JS templates which are being output too early. <script type="text/html" id="tmpl-fusion-shortcake-field-attachment">
<div class="field-block shortcode-ui-field-attachment shortcode-ui-attribute-{{ data.attr }}">
<label for="{{ data.attr }}">{{{ data.label }}}</label>
<# if ( typeof data.description=='string' ) { #>
<p class="description">{{{ data.description }}}</p>
<# } #>
<button id="{{ data.attr }}" class="shortcake-attachment-select button button-small add">{{ data.addButton }}</button>
<div class="attachment-previews"></div>
</div>
</script> and so on. I would expect these to get output within the |
goldenapples
added a commit
that referenced
this issue
Jan 16, 2019
As noted in #806, the pattern used for many of the Shortcake attribute fields which output custom field templates is to output those templates on the `shortcode_ui_loaded_editor` hook. In WP 5.0 with the block editor active, this hook fires before the page output is begun, which causes these script templates to be spit out before the opening <doctype> tag, causing all kinds of ruckus with the browser layout. Specifically, any output before the <doctype> declaration forces browsers into quirks mode, which renders the flex layout required for the Gutenberg editor incorrectly. In practive this was causing meta boxes to float awkwardly over editor content. This fixes the problem by, instead of outputting the templates on the `shortcode_ui_loaded_editor` hook, instead attaching a hook to a later action to output these templates in the admin footer.
This appears to have been fixed in #807. Should this be marked as closed? |
Yup, closing now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When Shortcode UI is active in WordPress 5.0 or higher, it triggers a php notice:
This PHP notice then triggers Gutenberg to load in “Quirks Mode”, which leads to additional issues like metaboxes appearing on top of blocks in the editor. Shortcode UI must be deactivated to make the block editor usable.
Here’s a detailed report on the issue: WordPress/gutenberg#12598
The text was updated successfully, but these errors were encountered: