Opened 6 years ago
Closed 6 years ago
#40981 closed defect (bug) (fixed)
Customizer: Menus: it is far too easy to mistakenly delete a menu because the "Delete Menu" link and the "Add Items" button are too close together
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.8.1 | Priority: | normal |
Severity: | major | Version: | 4.7.4 |
Component: | Customize | Keywords: | has-patch needs-testing commit fixed-major |
Focuses: | ui | Cc: |
Description
This came up in WordPress.com support. /hat tip @Droyal for reporting the issue.
Steps to reproduce:
- Go to Customize > Menus.
- Click on any menu to view details.
- Click on the empty space below the "Add Items" button.
Result: the menu is deleted without warning because the "Delete Menu" link spans the entire column which puts it in very close proximity to the "Add Items" button.
Video: 46s
Seen at http://alittletestblog.com/wp-admin/customize.php?return=%2Fwp-admin%2Fplugins.php&changeset_uuid=6b3d1591-9d2a-419d-a906-603da35edcf8 using Firefox 53.0.3 on Mac OS X 10.12.5 on a site hosted at WP Engine running WordPress 4.9-alpha-40885 via WordPress Beta Tester 1.1.2 and Jetpack 5.1-beta-12056-d2530de-master via Jetpack Beta Tester 2.0.3.
Attachments (3)
Change History (17)
#2
@
6 years ago
- Keywords good-first-bug added
- Milestone changed from Awaiting Review to Future Release
#3
@
6 years ago
Seems to me the click
event is bound to the <span>
element surrounding "Delete Menu" and the span takes all the available width. Looks like this is the reason why the empty space is "clickable".
While the menu isn't really deleted until you save the changes (I've just closed and reopened the Customizer and the deleted menu reappeared), worth considering that any action that is destructive or perceived as such by users should preferably ask for a confirmation.
#5
@
6 years ago
- Keywords good-first-bug removed
- Version set to 4.7.4
@melchoyce seems the change of the targeted element from the button to the span was intentional and there are other considerations involved, see [40396]. Other changes followed that but seems they're unrelated. So, I think the best person to ask to is: @westonruter :)
#6
@
6 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Future Release to 4.8.1
There's no good reason for not having a more specific selector for the click handler.
#7
@
6 years ago
- Keywords needs-testing added
Found another defect missed in [40396] and that is if the item addition panel is open, if you click the Delete Menu button it is not resulting in it being closed. This is due to the event.stopPropagation()
in the click handler, which I believe is superfluous when the feature was first introduced in [32806]. Fixed in 40981.1.diff.
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
6 years ago
#11
@
6 years ago
- Keywords commit added
- Owner set to westonruter
- Status changed from new to accepted
I'll commit this today unless someone tests and finds a problem.
Great find — usability thing that anyone could run into.