Problem/Motivation

If the search/autocomplete overlay is closed without selecting an option (e.g. when clicking somewhere else) the menu tree gets closed, the search field gets cleared and if a menu item's parent was selected, this selection is lost.

Steps to reproduce

Edit or create a node. Start creating a menu item. Optionally select a menu item's parent in the tree. Use the search field:
1. Type a string that exists in a page title. When the options are displayed click somewhere else.
or
2. Type a string that doesn't exist in a page title.

Proposed resolution

When listening to the 'autocompleteclose' event, check whether the value is a existing link key.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

philipp.weiss created an issue. See original summary.

philipp.weiss’s picture

StatusFileSize
new1.28 KB

This patch should solve the issue.

mcgowanm’s picture

Status: Active » Fixed

Looks great, thanks for catching that! I'll be releasing this shortly.

  • mcgowanm committed a7289df4 on 2.0.x
    Issue #3409053 by philipp.weiss: Selection lost when closing...
mcgowanm’s picture

Status: Fixed » Closed (fixed)