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

Don't automatically redirect to the "New Function" page when pressing the "Enter" key on the "/settings/functions" page #7235

Closed
Devessier opened this issue Sep 24, 2024 · 2 comments

Comments

@Devessier
Copy link
Contributor

Devessier commented Sep 24, 2024

Bug Description

Wherever the focus is on the "/settings/functions" page, pressing the "Enter" key will always navigate to the "New Function" page. This breaks accessibility.

Example:

CleanShot.2024-09-24.at.12.24.03.mp4

Expected behavior

The page should not listen to the Enter key and let the browser behave naturally.

Technical inputs

Remove that code:

useScopedHotkeys(
[Key.Enter],
() => {
navigate(getSettingsPagePath(SettingsPath.NewServerlessFunction));
},
SettingsServerlessFunctionHotkeyScope.ServerlessFunction,
);

@ehconitin
Copy link
Contributor

Hello @Devessier!
This hotscope was introduced in #6656 , so are we supposed to revert it completely or find a better way to implement hotscope in serverless functions?

bosiraphael pushed a commit that referenced this issue Sep 24, 2024
## Description

- This PR solves the issue #7235 
- On pressing enter, it automatically redirected to New function page in
settings
@Devessier
Copy link
Contributor Author

Thanks @harshit078 and @ehconitin for your contribution. This issue has been solved.

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

No branches or pull requests

2 participants