[wp-trac] [WordPress Trac] #52038: Issue in WooCommerce with wp_editor() after update to WP 5.6

WordPress Trac noreply at wordpress.org
Tue Dec 15 19:23:15 UTC 2020


#52038: Issue in WooCommerce with wp_editor() after update to WP 5.6
-------------------------------------+------------------------------
 Reporter:  rodrigosprimo            |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  General                  |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+------------------------------
Changes (by azaozz):

 * keywords:   => has-patch needs-testing


Comment:

 Think I got to the bottom of it, at least for `beforeunload`. Problem is
 somewhat related to upstream. The way the (old) autosave code works is by
 relying on several things/events to happen in the right order when the
 page is loading and when unloading (I'm surprised it worked well for so
 many years). Seems after the last TinyMCE update that order changes
 sometimes.

 In 52038.diff:
 - Update the `autosave.server.postChanged()` function to specifically look
 at instances of TinyMCE for `content` and `excerpt`.
 - Prefer that function when triggering the AYS on `beforeunload` on the
 old Edit Post screen (in post.js).

 Please test!

 Should work correctly with all possible combinations of Visual and Text
 tabs for both the content and excerpt. It's still possible that the "The
 backup of this post in your browser..." message may get triggered when
 reloading the page, but that would require quite larger fix, not suitable
 for a dot version.

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


More information about the wp-trac mailing list