WordPress.org

Make WordPress Core

Opened 17 months ago

Closed 17 months ago

Last modified 16 months ago

#43333 closed defect (bug) (fixed)

Unable to add menu item

Reported by: Blair jersyer Owned by: adamsilverstein
Milestone: 4.9.5 Priority: normal
Severity: normal Version: 4.3
Component: Customize Keywords: has-patch commit fixed-major
Focuses: ui, javascript Cc:

Description

Hi,
well i was trying to use the menu builder on the Customizer. And while i was trying to search a menu from the search field after having clicked "add items", then i pressed the "esc" button (Windows) and the menu items panel closed, when i clicked again on "Add items"... the panel was empty... i have to click on the cross within the search field to reveal the menu items.

Here is a video which shows the issue
http://nimb.ws/QPu0DM

Attachments (2)

customizer-menu-search-43333.patch (735 bytes) - added by aranwer104 17 months ago.
Customizer: Change the state of menu item search area when closed.
43333.diff (511 bytes) - added by adamsilverstein 17 months ago.

Download all attachments as: .zip

Change History (14)

#1 @afercia
17 months ago

  • Component changed from General to Customize

Can reproduce on current trunk. Seems when the panel closes, the filtering of the available menu items is not reset.

@aranwer104
17 months ago

Customizer: Change the state of menu item search area when closed.

#2 @aranwer104
17 months ago

  • Keywords has-patch added

#3 @adamsilverstein
17 months ago

  • Keywords needs-refresh added

Hi @aranwer104 - thanks for the patch. I tested your patch out and I now see that the search field is empty - however the list of results is not repopulated as expected. Here is a screencast of my test: https://cl.ly/0a3o2a3O0z12

Are you seeing something different?

#4 follow-up: @adamsilverstein
17 months ago

  • Keywords reporter-feedback added; needs-refresh removed
  • Owner set to adamsilverstein
  • Status changed from new to assigned

It looks like what is needed here is triggering a keyup event when the field is cleared, this triggers the search and thur resets the results. In my testing 43333.diff fixes the issue.

@aranwer104 or @Blair jersyer - can you test out this approach and see if anything looks off to you after the search reset?

#5 @adamsilverstein
17 months ago

  • Milestone changed from Awaiting Review to 5.0
  • Version changed from 4.8.3 to 4.3

I verified this issue has existed since menus in the customizer was introduced in WordPress 4.3.

#6 @Blair jersyer
17 months ago

Since i'm not a member of the core, how can i download and test your changes @adamsilverstein ?

#7 in reply to: ↑ 4 @aranwer104
17 months ago

  • Keywords ux-feedback added

Replying to adamsilverstein:

@aranwer104 or @Blair jersyer - can you test out this approach and see if anything looks off to you after the search reset?


Hi @adamsilverstein Your patch works perfectly (on Windows).Triggering keyup was an elegant and simple solution.

#8 @adamsilverstein
17 months ago

  • Keywords commit added; reporter-feedback ux-feedback removed
  • Milestone changed from 5.0 to 4.9.5

@aranwer104 great - thanks for testing!

@Blair jersyer - you really need to have a local setup to test this, in your local setup you would apply the diff I uploaded using the patch command. Here is an introduction to this (which is itself a work in progress): https://make.wordpress.org/core/handbook/testing/patch/

In any case, I think we have a confirmed fix - once we get this committed to core you can test it in the next release of WordPress.

#9 @Blair jersyer
17 months ago

Happy to see this issue fixed :)

#10 @adamsilverstein
17 months ago

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

In 42744:

Customizer: in menus, reset results when closing the 'add items' panel.

Trigger a keyup event when clearing the search field in response to closing the add item panel. The keyup event triggers a search and resets the results. Previously, the search field was cleared while the potentially blank search results were left in place making it impossible to select new menu items.

Props Blair jersyer, aranwer104, afercia.
Fixes #43333.

#11 @pento
16 months ago

  • Keywords fixed-major added

Re-opening for backporting to 4.9.5, change looks good to commit.

#12 @ocean90
16 months ago

In 42846:

Customizer: In menus, reset results when closing the 'add items' panel.

Trigger a keyup event when clearing the search field in response to closing the add item panel. The keyup event triggers a search and resets the results. Previously, the search field was cleared while the potentially blank search results were left in place making it impossible to select new menu items.

Merge of [42744] to the 4.9 branch.

Props Blair jersyer, aranwer104, afercia.
See #43333.

Note: See TracTickets for help on using tickets.