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

Disabling keypress action on primary button loading state #32

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

xLansang
Copy link

This PR extends the disabled click action to the "Enter" and "Space" keypress during loading state. This is to address the multiple request issue hoppscotch/hoppscotch#4134 in the hoppscotch repository.

What's Changed

  • Added a key event listener to HoppButtonPrimary.
  • Added a HandleKeypress function that disables the enter and space eventf if the button is loading
  • Added a "Keypress" story so that other developers can test the functionality of the new changes

I confirmed that both keypress actions are disabled during loading state on Histoire using the new story.
Here is a test video:

test_correct.mp4

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