[wp-trac] [WordPress Trac] #52046: The Distraction Free Writing setting on the old Edit Post screen may be reset after page reload

WordPress Trac noreply at wordpress.org
Mon Dec 28 11:55:30 UTC 2020


#52046: The Distraction Free Writing setting on the old Edit Post screen may be
reset after page reload
--------------------------+---------------------
 Reporter:  azaozz        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.6.1
Component:  Editor        |     Version:  5.6
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+---------------------

Comment (by azaozz):

 Think I (finally) got to the bottom of it. Looks like it is a timing issue
 (no surprise) of the `'tinymce-editor-init'` custom jQuery event. not sure
 why it only happens in Firefox but potentially can happen in any browser.

 Problem is that event is triggered asynchronously/independently of the DOM
 loading, but several of the callbacks are attached on DOM ready. For some
 reason after the TinyMCE and jQuery updates the order there has changed a
 bit and now `'tinymce-editor-init'` for the main editor on the old Edit
 Post screen may fire before DOM ready so several callbacks don't get
 executed. One of these callbacks is for making the toolbar "sticky" and
 setting/resetting "dfw mode". Patch coming up.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52046#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list