Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x]: Sidebar collapses when hitting the Escape key to close slideout #14461

Closed
mmikkel opened this issue Feb 23, 2024 · 2 comments
Closed

[5.x]: Sidebar collapses when hitting the Escape key to close slideout #14461

mmikkel opened this issue Feb 23, 2024 · 2 comments
Labels

Comments

@mmikkel
Copy link
Contributor

mmikkel commented Feb 23, 2024

What happened?

Description

If attempting to close an open slideout with a visible/expanded sidebar, the sidebar will collapse, and the user needs to hit the Escape key a second time to actually close the slideout.

On Craft 4, this only happens on narrow screens, and feels like wanted behavior because the sidebar has necessarily been actively expanded by the user.

On Craft 5.0.0-beta.3, slideout sidebars are toggleable on all screen widths (#14418) and on wider screens the behavior feels less wanted, considering the user hasn't necessarily "expanded" the sidebar:

CleanShot.2024-02-23.at.16.13.57.mp4

As far as I can tell this happens regardless of where the focus currently sits inside the slideout.

Steps to reproduce

  1. Open a slideout in a wide viewport, and hit the Escape key

Expected behavior

The slideout should immediately close unless the user has actively expanded it.

Actual behavior

The sidebar always collapses when hitting the Escape key. When the sidebar is collapsed, the Escape key closes the slideout.

Craft CMS version

5.0.0-beta.3

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

@mmikkel mmikkel added the bug label Feb 23, 2024
brandonkelly added a commit that referenced this issue Feb 26, 2024
@brandonkelly
Copy link
Member

Thanks! Fixed for the next release.

@brandonkelly
Copy link
Member

Craft 5.0.0-beta.4 is out with this fix. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants