baseweb icon indicating copy to clipboard operation
baseweb copied to clipboard

Tooltip: does not work when child element is in disabled state

Open ujjawalpabreja99 opened this issue 4 years ago • 2 comments

StatefulTooltip does not work with child element in disabled state. For example, tooltip is not rendered on disabled buttons.

Codesandbox for this: https://codesandbox.io/s/base-web-statefultooltip-forked-7dlpl?file=/src/example.js

Expected Behavior

Tooltip should be supported on disabled elements. Currently have to manage tooltip's state with onPointerEnter and onPointerLeave events on the child to achieve the desired behaviour.

Your Environment

Tech Version
Base UI v10.6.0
React 17.0.2
browser Chrome
  • [X] I have searched the issues of this repository and believe that this is not a duplicate.

ujjawalpabreja99 avatar Jan 10 '22 06:01 ujjawalpabreja99

@chasestarr can we use pointer events here? If there aren't any issues, we will raise MR to fix this.

Thanks

hhvys avatar Jan 19 '22 05:01 hhvys

Hi, switching to pointer events sounds like a good idea

chasestarr avatar Jan 20 '22 19:01 chasestarr