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

Ability to pass enterkeyhint to an Input #4371

Closed
supersime opened this issue Jun 8, 2022 · 2 comments · Fixed by #4377
Closed

Ability to pass enterkeyhint to an Input #4371

supersime opened this issue Jun 8, 2022 · 2 comments · Fixed by #4377

Comments

@supersime
Copy link

Problem description

We have recently encountered an issue with the keyboard displayed on Chromium on Android (https://support.google.com/chrome/thread/164815517/google-chrome-101-on-android-shows-tab-key-on-soft-keyboard-instead-of-enter-for-html-input-field?hl=en).

It seems that an Input can, for some unknown reason, show a "Next" value on the keyboard, rather than a "Go" (submit). Pressing Next appears to take you to the next tabIndex element on the page. However we need to catch the "enter" key being pressed to trigger a submit.

Proposed solution

Update lib/htmlPropsUtils.js (https://github.com/Semantic-Org/Semantic-UI-React/blob/master/src/lib/htmlPropsUtils.js#L3) so that htmlInputAttrs supports enterkeyhint as a valid attribute to pass through to the Input element on the DOM.

@welcome
Copy link

welcome bot commented Jun 8, 2022

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@layershifter
Copy link
Member

According to React (https://github.com/facebook/react/blob/ca106a02d1648f4f0048b07c6b88f69aac175d3c/packages/react-dom/src/shared/possibleStandardNames.js#L62) it should have different casing i.e. enterKeyHint. But, feel free to a submit a PR 👍

layershifter pushed a commit that referenced this issue Aug 18, 2022
This PR adds the missing `enterKeyHint` attribute which allows the customisability of the enter key on virtual keyboards.

In my usage, this fixes an issue on Android where the enter button character doesn't reflect the action it performs.

Closes #4371
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants