You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Tooltips of MenuItem is not showing when open menu button by keyboard #34296
The tooltip doesn't appear when we first open menu with keyboard.
Note:
We've been using title prop for tooltip of menu item. There is a bug for it so we're using V9 tooltip as the solution. Quick sharing about that issue as fyi. Using title prop, when we first open menu with keyboard, the tooltip will be displayed on the top left corner. Repro video:
Expected Behavior
The tooltip of first item menu should appear when we first open menu with keyboard since focus is at that item.
As I see it's related to StrictMode, it does not repro when StrictMode is disabled.
Edit: That won't be an easy fix as the source of the issue is useBrowserTimer(). If I will simplify, we call setTimeout() outside useEffect, but clearTimeout() is called inside, basically what happens:
- render1
- render2
- useEffect1
- onClickHandler: setTimeout
- useEffect2:dispose: clearTimeout // wipes the state update
- useEffect2
Activity
layershifter commentedon Apr 23, 2025
As I see it's related to
StrictMode, it does not repro whenStrictModeis disabled.Edit: That won't be an easy fix as the source of the issue is
useBrowserTimer(). If I will simplify, we callsetTimeout()outsideuseEffect, butclearTimeout()is called inside, basically what happens:layershifter commentedon Jul 2, 2025
my input from offline: