Skip to content

fix(fuselage): EmailInput lets a spread type override type="email" #42811

Description

@tassoevan

Description

EmailInput renders <InputBox type="email" {...props} />. Its props type omits type, but a spread from a wider-typed object bypasses excess-property checks, so the input can render as another type. The other typed inputs probably share this pattern.

Suggested fix

Put type="email" after the spread, and check the other typed inputs.

Context

Found by cubic while reviewing #42763, which moved @rocket.chat/fuselage into this monorepo. The behavior is unchanged from Fuselage 0.96.0, so it was out of scope there.

Activity

  1. added
    area: ui/uxRelated to UI/UX, frontend code, accessibility, and user interaction
    on Oct 15, 2026
  2. schizophrenicmaniac commented on Oct 15, 2026

    @schizophrenicmaniac

    Hi, I'd like to work on this. EmailInput, NumberInput, SearchInput, TextInput, UrlInput and PasswordInput all set type on InputBox before the props spread, so I'd move it after the spread in each one and add tests that a passed type can't override it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ui/uxRelated to UI/UX, frontend code, accessibility, and user interactiontype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions