Skip to content

event.preventBaseUIHandler is not a function #4088

@aarongarciah

Description

@aarongarciah

Bug report

Current behavior

Calling event.preventBaseUIHandler() inside some event handlers yields an error although the types say preventBaseUIHandler exists:

event.preventBaseUIHandler is not a function

Some examples of event handlers that have wrong types:

  • MenuItem: onMouseDown
  • MenuCheckboxItem: onMouseDown
  • MenuRadioItem: onMouseDown
  • MenuLinkItem: onMouseDown, onKeyDown, onKeyUp
  • AccordionTrigger: onMouseDown, onMouseUp

This is probably a general type problem affecting event handlers in many components.

Expected behavior

Either update the types to remove preventBaseUIHandler from the relevant types or include preventBaseUIHandler in such events, but the latter probably doesn't make sense if the event handler in question is not doing anything on the Base UI side.

Reproducible example

Base UI version

v1.2.0

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions