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

close floating sidebar on escape #1526

Merged
merged 1 commit into from
Jul 24, 2024
Merged

close floating sidebar on escape #1526

merged 1 commit into from
Jul 24, 2024

Conversation

mbostock
Copy link
Member

This small enhancement makes it so that when the sidebar is opened in floating mode (with a drop shadow), Escape will close the sidebar in the same fashion as clicking on the backdrop. (Note that this sidebar can either be opened persistently with Command-B, or temporarily opened with Command-K.)

@mbostock mbostock requested a review from Fil July 20, 2024 21:47
Copy link
Contributor

@Fil Fil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of note, on a small screen with the search field focused, this means we now need to hit Esc twice: to empty the field, then to close the sidebar. I'm fine with this new behavior (which feels less surprising, in a way).

@mbostock mbostock merged commit 2d7f6c0 into main Jul 24, 2024
4 checks passed
@mbostock mbostock deleted the mbostock/escape-toggle branch July 24, 2024 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants