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

fix: improve keyboard operability especially on search page and editor #2730

Merged
merged 3 commits into from
Apr 1, 2024

Conversation

shuuji3
Copy link
Member

@shuuji3 shuuji3 commented Apr 1, 2024

This PR contains two improvements for keyboard navigations:

The first one is to allow using the ESC key to unfocus the editor and search inputs.

This is the default behavior for the native HTML input/textarea elements so users expect that the ESC key works as usual, but Elk uses the custom elements that prevent navigating with the ESC key and it needs to use the Tab key to go to outside input.

The second one is to fix the behavior of / key in the search page.

When typing / in other pages than the search page, Elk will navigate to the search page and then autofocus the search input element. But if we are already inside the search page, / won't let us focus on the input.

Copy link

stackblitz bot commented Apr 1, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

netlify bot commented Apr 1, 2024

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit 1fd7f6f
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/660a44ca71161c0008466356

Copy link

netlify bot commented Apr 1, 2024

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit 1fd7f6f
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/660a44caf1b0c6000882d25b
😎 Deploy Preview https://deploy-preview-2730--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@shuuji3 shuuji3 changed the title fix: allow to escape from compose editor and search input by esc key fix: improve keyboard operability especially on search page and editor Apr 1, 2024
@patak-dev patak-dev enabled auto-merge April 1, 2024 05:24
@patak-dev patak-dev added this pull request to the merge queue Apr 1, 2024
Merged via the queue into main with commit eee671c Apr 1, 2024
15 checks passed
@patak-dev patak-dev deleted the shuuji3/fix/improve-keyboard-operability branch April 1, 2024 05:26
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