From 0e3d7d414eedab13abafecdea00044a6b9bd5335 Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Tue, 20 Nov 2018 12:17:35 +0100 Subject: [PATCH] Fix IE11 toolbar. This PR is a better replacement for #12096. In IE11, in the toolbar markup, you can briefly see the appearance of a new HTML element called . This is obviously not a real element, but it is rendered by IE11 as a real element, which means it breaks the flexing of the actual children of the toolbar. This PR, props to @youknowriad, adds a change to the assets so the element doesn't appear in the first place. --- lib/client-assets.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/client-assets.php b/lib/client-assets.php index 9a46ea800633..dd2edaf8bc1e 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -167,16 +167,16 @@ function gutenberg_register_scripts_and_styles() { register_tinymce_scripts(); - wp_script_add_data( + wp_add_inline_script( 'wp-polyfill', - 'data', gutenberg_get_script_polyfill( array( '\'fetch\' in window' => 'wp-polyfill-fetch', 'document.contains' => 'wp-polyfill-node-contains', 'window.FormData && window.FormData.prototype.keys' => 'wp-polyfill-formdata', 'Element.prototype.matches && Element.prototype.closest' => 'wp-polyfill-element-closest', - ) + ), + 'after' ) );