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

Bug: Signup > Create Workspace | Can not use "enter" key to submit my workspace name. #5221

Open
chwasifjameel opened this issue Apr 6, 2024 · 1 comment

Comments

@chwasifjameel
Copy link

Issue:
After the "Signup" screen, the "Create Workspace" screen does not submit values if you hit enter.

Description:
The form is being submitted with evt.Key='Enter'. form tag has its own submission which should be invalidated if evt.Key is being used to submit the form.

Submission function for reference:
#https://github.com/hcengineering/platform/blob/main/plugins/login-resources/src/components/Form.svelte#L137-L145

Why Form.svelte is not giving this issue for login and signup?
Possibly because those operations do not take that long and navigation happens very quickly. In case of Workspace creation, it takes a few seconds

Reference:
image

Solution:
We should add evt.preventDefault() on this keydown function.

Updated code:

on:keydown={(evt) => {
    if (evt.key === 'Enter' && !inAction) {
      evt.preventDefault()  
      validate($themeStore.language).then((res) => {
        if (res) {
          performAction(action)
        }
      })
    }
  }}
@chwasifjameel
Copy link
Author

Please assign this to me. I have resolved this.

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

No branches or pull requests

1 participant