[wp-trac] [WordPress Trac] #54522: unsaved edits should consistently trigger pop-up alert

WordPress Trac noreply at wordpress.org
Fri Nov 26 12:49:29 UTC 2021


#54522: unsaved edits should consistently trigger pop-up alert
--------------------------+-----------------------------
 Reporter:  tiger40490    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:  5.6
 Severity:  major         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 https://wordpress.org/support/topic/unsaved-content-and-autosave/
 described the steps to reproduce the bug.

 Background: I use the classic editor to write posts every day. Like many
 users, I often forget my unsaved edits, and try to leave the edit page.
 This is such a common user error that WP has multiple protections. The
 autosave is one protection but I won't talk about it.

 A second protection is a local cache in my browser. This is the
 (unsatisfactory) protection used in the current WP version (5.8.2). It's
 unsatisfactory because the forgetful user is allowed to leave the edit
 page with unsaved changes. When she returns to edit the same post, she may
 fail to notice a warning message in a banner.

 This warning is triggered presumably because the local cached version
 differs from the latest saved version in MySQL.

 I have seen (or missed) this banner warning more than 100 times. Not as
 good as the traditional protection that I have seen in 5.5.3.

 The traditional protection is a pop-up alert whenever user attempts to
 "leave" the post-edit page.

 (Leaving means Either closing the browser, or going to another website, or
 clicking on a link.)

 Whenever the editor content differs from the last published version, the
 alert would ''reliably'' pop up. I would either hit cancel then save my
 changes, or hit Leave to discard my change **knowingly**.

 Needless to say, the pop-up protection is more proactive, more preemptive
 than the second protection (local cache). That's why current WP version
 still uses this pop-up protection, but unreliable. In
 https://wordpress.org/support/topic/unsaved-content-and-autosave/ I
 discussed when the pop-up shows/doesn't show. To reproduce the bug (no
 pop-up) you need to be patient.

 Even if you can't reproduce the bug, I can guarantee that it does exist.
 The attached screenshot is the banner warning in 5.8.2. It won't show up
 if the pop-up has always worked. In 5.5.3 I have not seen this banner.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54522>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list