Open krystxf opened 1 week ago
This is happening because there are different triggers for blur click
and button click
mousedown
- (doesn't wait for button to be released)onclick
- fires after full click (mouse button is released)Because of this two state changes are happening almost at the same time and asynchronous state updates causes flicker.
onClick
to onMouseDown
and add onTouchStart
as welluseOnClickOutside
Describe the bug Dropdown component flicks when specific spot is clicked. This is now happening only in storybook and not in the app, but it used to be in app as well.
Info:
How to reproduce Steps to reproduce the behavior:
packages/components
storybookExpected behavior Menu content doesn't flic
Screenshots
https://github.com/user-attachments/assets/5470fc67-f31e-41da-b73d-9bd06dc8ea8d
Additional context File with issue