Skip to content

enterkeyhint attribute does not does not exist on button/input types #1233

@benaltair

Description

@benaltair

Describe the bug

The enterkeyhint (more information) HTML attribute throws JSX errors in VSCode when added to input or button elements.
image

Reproduction

In a Svelte file, add a form with an input that has the enterkeyhint attribute:

<form>
	<input type="text" />
	<input type="submit" enterkeyhint="send"/>
</form>

Seems to throw similar errors for both input and button elements. input refers to SvelteInputProps whereas button refers to HTMLProps types, so it could be that one issue is for Svelte and a complimentary issue is for VSCode, depending on where those types live.

Logs

For `input`:

Type '{ type: string; enterkeyhint: string; }' is not assignable to type 'SvelteInputProps'.
  Property 'enterkeyhint' does not exist on type 'SvelteInputProps'.js(2322)

For button:

Type '{ type: string; enterkeyhint: string; }' is not assignable to type 'HTMLProps<HTMLButtonElement>'.
  Property 'enterkeyhint' does not exist on type 'HTMLProps<HTMLButtonElement>'.js(2322)


### System Info

```shell
System:
    OS: Windows 10 10.0.22000
    CPU: (16) x64 AMD Ryzen 7 3800X 8-Core Processor
    Memory: 20.16 GB / 31.92 GB
  Binaries:
    Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (95.0.1020.40)
    Internet Explorer: 11.0.22000.120
  npmPackages:
    svelte: ^3.43.2 => 3.43.2

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions