-
Notifications
You must be signed in to change notification settings - Fork 26
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
[Enhancement] - Enable the use of Enter keys for modals #527
Comments
Hi @leekahung, I would like to work on this solution for the Logout and Inactivity modals if possible? |
Sure, give it a go. |
@leekahung @JonnyMc94 Enter key works when focused on the button desired. Could make modal functions fire on Enter key press when in text fields as an approach as well - I haven't tested to see if this is already working or not. |
We got the enter key press working for the pod server input field, so I think we could try a similar strategy |
The field on login page? That doesn't work for me. Or am I thinking of the wrong thing? The enter key works just fine on the Add Contacts modal, and also Add Documents. Although Add Documents is a little strange because you have to have chosen a file to upload first & if you hit enter on SelectDocumentType it doesn't really work due to it being a select menu - it causes the dropdown to open/close. But if you were on any other input it would work - see video: Screen.Recording.2023-11-21.at.7.55.36.PM.movEnter key also works fine on Sharing a document modal - SetACLPermissionsModal. So seems:
@leekahung does that sound like an okay approach? Or did you have something else in mind? |
No, I think you're right about the Enter key no longer working anymore. It had worked before (see PR #340), but was think it might have broke from our recent update from the original input field to MUI
I like the idea with the auto-focus upon enter the modal. Though, I'm not sure if auto-focusing on the button would require users to hit For now, I'll update this issue to simply enabling |
Hi @leekahung. Just to confirm, this enhancement is now related to enabling the enter key for the logout, inactivity and login modals? |
Yes. A good bonus would be to enable the enter key for all modal, including the ones that has input fields or text fields in them. |
@JonnyMc94 Are you working on this? If so, feel free to assign yourself to it. |
Hi @andycwilliams, yes I'm currently working on this. It looks like I can't assign myself? |
Ah, it may be because you're a contributor and not technically a member of the GitHub group. Anyway I assigned you. |
Apologies for the lack of movement on this guys. I have changes I'm currently working on and hope to have them pushed in the next few days. |
It's alright. A couple of weeks isn't an enormous amount of time with no movement. Besides, it's the holiday season so things are a bit slower overall. |
@JonnyMc94 still working on this? |
@xscottxbrownx I did some work on this over the holidays but was having issues. I couldn't get the focus on the submit button when the modal opened. I worked around this by placing an event listener on the modal itself. This worked but unfortunately then ran into a bug with executing functionality on modal close e.g logging out, submitting form content/alerting user of empty required form content. |
@JonnyMc94 Any progress? |
@JonnyMc94 Once again seeing if you have any updates |
Unassigning due to lack of response |
Describe the Current Behavior/Feature:
More related to Quality of Life changes as oppose to make the functions work.
While we have functioning modals doing what we want them to be doing, the submission of these modals are relegated to simply clicks. If there could be a way to simply perform the same action, but with the enter key, that would be nice. This type of change would be ideal for modals which only rely on buttons and doesn't have any textfields/input fields involved.
For example, if user wishes to log out, they could simply hit the "enter" key when the logout modal pops up as an alternative to clicking.
Or if we wish to push this further, we could also get these enhancements to work with modals with textfields/input fields, we could have the "enter" key work after the user exited the fields.
Rationale:
Ease of actions that would augment what we have with mouse presses.
Proposed Implementation (if applicable):
Include a listener when entering modals that would help perform actions with return.
Additional context:
Initially have this enhancement in mind for modals like the logout and inactivity message (see screenshot):
But could be expanded to other modal like add contacts or new message if it's something we think would be useful.
The text was updated successfully, but these errors were encountered: