craftcms/cms

[5.x]: Slideout shortcuts broken when the slideout is opened via disclosure menu

Closed this issue · 3 comments

What happened?

Description

When a slideout is opened via a discolusre menu (e.g. the user selects edit field on a FLD item) the slideout shortcuts (e.g Ctrl+S for saving, or ESC for closing) don't work.

Steps to reproduce

  1. Go to the FLD for an entry type.
  2. Try to edit a field.
  3. The slideout opens.
  4. Try to perform a save, or close (cancel) on the slideout via the corresponding keyboard shortcut.

Expected behavior

The action invoked via the shortcut should be performed.

Actual behavior

On ESC nothing happens. On Ctrl+S the browser opens the native save dialog.

Craft CMS version

5.2.0

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

I also have a suspicion that this also causes (or is somehow related to) the piling-on of event listeners on multiple disclosure menus on multiple levels of slideouts.

Hi, thanks for reporting! I raised a PR for this.

Craft 4.10.1 and 5.2.1 are out with a fix for that. Thanks again!