Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #65328


Ignore:
Timestamp:
05/22/2026 09:27:17 PM (6 months ago)
Author:
sabernhardt
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #65328 – Description

    initial v1  
    22
    33
    4 In WordPress 7.0, the Distraction Free Writing (DFW) button no longer appears in the TinyMCE toolbar, indicating the feature was removed or disabled. However, wp-admin/js/editor-expand.js still contains code that registers the DFW button with TinyMCE and immediately hides it during the editor init event:
     4In WordPress 7.0, the Distraction Free Writing (DFW) button no longer appears in the TinyMCE toolbar, indicating the feature was removed or disabled. However,`wp-admin/js/editor-expand.js` still contains code that registers the DFW button with TinyMCE and immediately hides it during the editor `init` event:
    55
     6{{{
    67editor.on( 'init', function() {
    78    if ( button.disabled() ) {
    … …  
    910    }
    1011} );
     12}}}
    1113
    12 This button.hide() call triggers a TinyMCE reflow/repaint cycle (via theme.js) at a moment when the new React-based admin UI introduced in 7.0 has not finished laying out. The result is an incorrect height being stamped onto #mceu_31-body, causing the TinyMCE editor area to render with a large empty gray space.
    13 The bug is intermittent because it is a race condition between React finishing its layout and TinyMCE firing init. It reproduces most reliably on a hard refresh (Shift+F5).
     14This `button.hide()` call triggers a TinyMCE reflow/repaint cycle (via `theme.js`) at a moment when the new React-based admin UI introduced in 7.0 has not finished laying out. The result is an incorrect height being stamped onto `#mceu_31-body`, causing the TinyMCE editor area to render with a large empty gray space.
     15The bug is intermittent because it is a race condition between React finishing its layout and TinyMCE firing `init`. It reproduces most reliably on a hard refresh (`Shift+F5`).
     16
    1417Steps to reproduce:
    1518
    16 Install WordPress 7.0
    17 Use the Classic Editor (either via the Classic Editor plugin or add_filter( 'use_block_editor_for_post', '__return_false' ))
    18 Open any post for editing
    19 Hard refresh (Shift+F5) repeatedly until the bug appears
     19- Install WordPress 7.0
     20- Use the Classic Editor (either via the Classic Editor plugin or `add_filter( 'use_block_editor_for_post', '__return_false' )`)
     21- Open any post for editing
     22- Hard refresh (`Shift+F5`) repeatedly until the bug appears
    2023
    2124Expected result: TinyMCE editor renders at the correct height.
    22 Actual result: #mceu_31-body receives an inflated inline height (e.g. 459.391px) while the inner #content_ifr iframe is a normal size, leaving a large gray gap.
    23 Root cause: The DFW button registration and hide logic in editor-expand.js was not removed when DFW support was dropped in 7.0. Removing that block should resolve the issue.
     25Actual result: `#mceu_31-body` receives an inflated inline height (e.g. 459.391px) while the inner `#content_ifr iframe` is a normal size, leaving a large gray gap.
     26Root cause: The DFW button registration and hide logic in `editor-expand.js` was not removed when DFW support was dropped in 7.0. Removing that block should resolve the issue.
    2427Workaround: None confirmed beyond avoiding hard refreshes.