Opened 4 weeks ago
Last modified 22 hours ago
#64623 accepted defect (bug)
Prevent losing data when clicking links on Settings pages
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.1 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Administration | Keywords: | has-patch changes-requested |
| Focuses: | accessibility, javascript | Cc: |
Description
Reported by @vidugupta on #23432 and PR 9130
Several external links within WordPress admin setting pages—specifically General, Discussion, and Permalink—currently open in the same window. This behavior can negatively impact the user experience in the following ways:
- Users may lose unsaved changes if they click an external link without first saving their settings.
- Users may assume the link opens in a new tab (as is the case with links in the Edit Profile page or the Help tab), and unintentionally navigate away from the page.
Inconsistencies in link behavior across admin pages create confusion and a fragmented user experience.
Change History (9)
#2
@
4 weeks ago
- Milestone changed from Awaiting Review to 7.0
- Owner set to joedolson
- Status changed from new to accepted
#3
@
4 weeks ago
Aside: if bfcache were enabled in the admin, then navigating away from an unsaved settings screen would not mean the loss of unsaved settings. See #63636. That said, browsers typically persist changes to plain form fields when navigating away and back again. Controls built with JS, however, get re-built and there is data loss.
#4
@
4 weeks ago
I think that it's important to give users a confirmation. Even if those unsaved settings were persistent, the notice ensures that the user is either deciding not to save their changes or reminding them to save their changes. When it's a silent behavior, the user can think that they've already saved and never come back.
This ticket was mentioned in PR #10927 on WordPress/wordpress-develop by @anukasha.
4 weeks ago
#5
- Keywords has-patch added
Trac ticket: [](https://core.trac.wordpress.org/ticket/64623)
## Use of AI Tools
This ticket was mentioned in PR #10940 on WordPress/wordpress-develop by @niravsherasiya7707.
4 weeks ago
#6
Core ticket: https://core.trac.wordpress.org/ticket/64623
@westonruter commented on PR #10940:
4 weeks ago
#7
Thank you for the PR, but this isn't the right approach. The alert needs to only be shown when there are unsaved changes, and it needs to show when navigating away from an admin screen by any means (including the use of the back button). Please offer suggestions to the existing PR: https://github.com/WordPress/wordpress-develop/pull/10927
#40493 added a JS confirmation before navigating away from the profile page, and that could be appropriate for Settings pages too.