Make WordPress Core

Opened 3 years ago

Last modified 19 months ago

#54522 new defect (bug)

unsaved edits should consistently trigger pop-up alert

Reported by: tiger40490's profile tiger40490 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 5.6
Component: Editor Keywords:
Focuses: Cc:

Description

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.

Attachments (1)

banner_warning.png (47.3 KB) - added by tiger40490 3 years ago.

Download all attachments as: .zip

Change History (3)

#1 @tiger40490
2 years ago

Any update, please? This bug report has not been addressed for more than a year. Is anyone looking at it?

#2 @tiger40490
19 months ago

Still unresolved. Tested today on version 6.2.

Note: See TracTickets for help on using tickets.