Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#38953 closed defect (bug) (fixed)

Customize Menus: clicking outside of the available menu items panel does not close the panel

Reported by: celloexpressions's profile celloexpressions Owned by: westonruter's profile westonruter
Milestone: 4.7.4 Priority: normal
Severity: normal Version: 4.6.1
Component: Customize Keywords: has-patch commit fixed-major
Focuses: javascript Cc:

Description

When the available menu items panel is open, clicking anywhere outside of the panel except for on the menu-item-delete buttons should (and used to) close the panel. In particular, clicking on the preview and clicking on an added menu item to expand its options currently do not close the available menu items panel, but clicking elsewhere in the customize pane works.

Verified that this behavior exists in 4.6.1, so it was a regression some time before 4.7.

Attachments (3)

38953.patch (1.5 KB) - added by rockwell15 7 years ago.
Added pointer-events none to preview iframe when the available menu items panel is open. Then closes the panel on #customize-preview & .menu-item-handle click
38953.2.diff (1.5 KB) - added by westonruter 7 years ago.
38953.diff (1.2 KB) - added by maguiar 7 years ago.
Fixes menu delete button and prevents available menu items from closing when removing an item

Download all attachments as: .zip

Change History (24)

@rockwell15
7 years ago

Added pointer-events none to preview iframe when the available menu items panel is open. Then closes the panel on #customize-preview & .menu-item-handle click

#1 @rockwell15
7 years ago

  • Keywords has-patch added; needs-patch removed

@westonruter
7 years ago

#2 @westonruter
7 years ago

  • Owner set to westonruter
  • Status changed from new to accepted

#3 @westonruter
7 years ago

@celloexpressions does this get your 👍?

#4 @celloexpressions
7 years ago

  • Keywords commit added

38953.2.diff looks good and works in my testing. Still not sure when/how this broke.

#5 @westonruter
7 years ago

Just checked and it's been this way since at least 4.5.

#6 @westonruter
7 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 39548:

Customize: Collapse available nav menu items panel when clicking outside over preview or over existing items.

Props rockwell15.
Fixes #38953.

#7 @celloexpressions
7 years ago

  • Keywords needs-patch added; has-patch commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

This change broke the bulk-delete functionality. The available menu items panel can't be closed if the click is on the item-delete button within the menu item handle.

Again, the specific functionality that this ticket looks to restore previously worked, and I specifically remember adding the check for the delete button too. Not sure what happened to it.

This ticket was mentioned in Slack in #core-customize by melchoyce. View the logs.


7 years ago

#9 @melchoyce
7 years ago

  • Milestone changed from 4.8 to 4.7.4

#10 @celloexpressions
7 years ago

  • Focuses javascript added
  • Keywords good-first-bug added

Since this was committed to trunk previously, two things are now required:

  • Amend the trunk fix to not close the panel when the delete buttons are activated. (good-first-bug, needs a patch)
  • Back-port both commits to the 4.7 branch.

#11 @westonruter
7 years ago

  • Owner westonruter deleted
  • Status changed from reopened to assigned

This ticket was mentioned in Slack in #core by swissspidy. View the logs.


7 years ago

@maguiar
7 years ago

Fixes menu delete button and prevents available menu items from closing when removing an item

#13 @maguiar
7 years ago

  • Keywords has-patch added; needs-patch removed

#14 @westonruter
7 years ago

  • Keywords needs-testing added

This ticket was mentioned in Slack in #core by swissspidy. View the logs.


7 years ago

#16 @adamsilverstein
7 years ago

@westonruter

I tested 38953.diff and it works as expected --

Before the patch, every time i click the red X to remove a menu item, the side panel closes:

https://cl.ly/0n162E3t0L1y/Screen%20Recording%202017-04-07%20at%2002.02%20PM.gif

After the patch I can remove multiple items and the side panel stays open:

https://cl.ly/1D2l2d0f1Q0z/Screen%20Recording%202017-04-07%20at%2002.07%20PM.gif

This patch also fixes the delete menu link not working issue:

Before (delete link doesn't work):
https://cl.ly/1T1N1X1O0U0p/Screen%20Recording%202017-04-07%20at%2002.14%20PM.gif

After - the menu is properly deleted:
https://cl.ly/0o3U3e0e0M2m/Screen%20Recording%202017-04-07%20at%2002.13%20PM.gif

#17 @adamsilverstein
7 years ago

  • Keywords needs-testing removed

#18 @westonruter
7 years ago

  • Keywords commit added; good-first-bug removed
  • Owner set to westonruter
  • Status changed from assigned to accepted

#19 @westonruter
7 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 40396:

Customize: Fix behavior of clicking Delete Menu link and keep available nav menu items panel open when doing bulk deletion.

Props maguiar, adamsilverstein for testing.
Amends [39548].
Fixes #38953.

#20 @westonruter
7 years ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening for consideration in 4.7.4

#21 @swissspidy
7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 40401:

Customize: Fix behavior of clicking Delete Menu link and keep available nav menu items panel open when doing bulk deletion.

Props maguiar, adamsilverstein for testing.
Amends [39548].
Fixes #38953.

Merges [40396] to the 4.7 branch.

Note: See TracTickets for help on using tickets.