Skip to content

[4.5]: Craft.cp.notification that contains buttons prevents shortcuts from working #13574

Closed
@i-just

Description

@i-just

What happened?

Description

In the Control Panel, when Craft.cp.notification that contains a button (or input) is triggered, it prevents form shortcuts from working.

Caused by: https://github.com/craftcms/cms/blob/develop/src/web/assets/cp/src/js/CP.js#L1536-L1541

Steps to reproduce

  1. On the 4.5-beta.2 branch, open the entry edit page and attempt to save it and trigger a validation error.
  2. “This {type} has been updated.” notice should show with a “Reload” button.
  3. Try to use Ctrl/Cmd+S to save and continue editing.

Expected behavior

Once the notice has been dismissed, the shortcut should trigger the usual action. In the case of Ctrl/Cmd+S, it should trigger save and continue editing.

Actual behavior

Once the notice has been dismissed, the shortcut triggers the browser’s native Save As dialogue.
Screenshot 2023-08-18 at 12 35 30

Craft CMS version

4.5-beta.2

PHP version

8

Operating system and version

Mac OS

Database type and version

MySQL

Image driver and version

n/a

Installed plugins and versions

n/a

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions