We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d573045 commit 730a174Copy full SHA for 730a174
src/useClickOutside.ts
@@ -82,6 +82,11 @@ function useClickOutside(
82
83
if (currentTarget && contains(currentTarget, e.target as any)) {
84
waitingForTrigger.current = true;
85
+ } else {
86
+ // When clicking on scrollbars within current target, click events are not triggered, so this ref
87
+ // is never reset inside `handleMouseCapture`. This would cause a bug where it requires 2 clicks
88
+ // to close the overlay.
89
+ waitingForTrigger.current = false;
90
}
91
});
92
0 commit comments