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

[@types/react] add enterkeyhint attribute to input and textarea #43985

Closed
4 tasks done
xzilja opened this issue Apr 17, 2020 · 3 comments · Fixed by #48971
Closed
4 tasks done

[@types/react] add enterkeyhint attribute to input and textarea #43985

xzilja opened this issue Apr 17, 2020 · 3 comments · Fixed by #48971

Comments

@xzilja
Copy link
Contributor

xzilja commented Apr 17, 2020

If you know how to fix the issue, make a pull request instead.

There is experimental input and textarea attribute enterkeyhint https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes that does not seem to be supported by type definitions. Even though experimental it is supported on latest releases of safari and chrome, perhaps it would be a good idea to add it?

Currently following error pops up when trying to use it in react:

Screenshot 2020-04-17 at 14 57 06

@eps1lon
Copy link
Collaborator

eps1lon commented Apr 17, 2020

We shouldn't get this in before facebook/react#18634.

Right now you can add it by using `enterkeyhint" and module augmentation (see Adding non-standard attributes). But the name will change later.

I also wouldn't consider it experimental. It's in the WHATWG spec. We just need to update the data upstream (mdn/browser-compat-data#5990, mdn/sprints#3109, microsoft/TypeScript-DOM-lib-generator#853). TS typings will have it in 4.0 apparently (microsoft/TypeScript-DOM-lib-generator#853 (comment)).

@jens-duttke
Copy link
Contributor

@eps1lon Since this is part of the already released React 17, when will the type definition get updated?

@eps1lon
Copy link
Collaborator

eps1lon commented Oct 21, 2020

@eps1lon Since this is part of the already released React 17, when will the type definition get updated?

Once #48971 is released.

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 a pull request may close this issue.

3 participants