Skip to content

[Tooltip] When wrapping an input which is disabled while focused an error is thrown #45373

Open
@DavidJohnWilliams

Description

@DavidJohnWilliams

Steps to reproduce

Steps:

  1. Open this link to live example: Code Sandbox
  2. Click in the input as soon as the preview loads (if it is disabled already, refresh the preview and try again)
  3. Wait a few seconds

Current behavior

A Javascript error is thrown

Expected behavior

The input should be disabled as usual

Context

Input has a useEffect which calls onBlur without an event. This is sort of documented i.e. a comment on the onBlur of Input however the Tooltip does not take account of this and tries to access event.target.

Your environment

It happens in any browser

Search keywords: tooltip target

Metadata

Metadata

Labels

bug 🐛Something doesn't workcomponent: tooltipThis is the name of the generic UI component, not the React module!package: material-uiSpecific to @mui/material

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions