Skip to content

Commit

Permalink
fix(UseFloatingWithInteractions): fix bug with disableAfterClickClose…
Browse files Browse the repository at this point in the history
… in Tooltip (#7657)

Поправлен баг с закрытием тултипа при клике на якорный элемент при прокидывании disableCloseAfterClick=true
  • Loading branch information
EldarMuhamethanov authored and actions-user committed Sep 24, 2024
1 parent 2321909 commit f0a8e3e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ export const useFloatingWithInteractions = <T extends HTMLElement = HTMLElement>
const handleFocusOnReference = useStableCallback(() => {
// Повторный вызов события фокуса - следствие клика на reference-элемент
if (shownLocalState.shown) {
if (!closeAfterClick && shownLocalState.reason === 'hover') {
return;
}
commitShownLocalState(false, 'focus');
return;
}
Expand Down

0 comments on commit f0a8e3e

Please sign in to comment.