Skip to content

isInteractiveElement() test for higher level JSX components produces false negatives when components are similarly named to DOM elements #46

Closed
@sohkai

Description

@sohkai

The test to skip testing higher level JSX components in isInteractiveElement seems to be too broad as it uses .toUpperCase() on the tagName before comparing with the map of DOM elements. This produces false negatives when a custom component is named similarly to a DOM element, but with capitalizations (eg. Button vs. button).

To my knowledge, removing the .toUpperCase() should fix this, but I'm not sure if there are non-React use cases of JSX where, for example, Button might mean the same as button, or if there were any other factors that required relaxing the case-sensitivity.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions