-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(react-utilities): click scrollbar should invoke callback in useOnClickOutside
#28965
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e0b2268:
|
📊 Bundle size reportUnchanged fixtures
|
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
Avatar | mount | 598 | 618 | 5000 | |
Button | mount | 320 | 322 | 5000 | |
Field | mount | 1104 | 1090 | 5000 | |
FluentProvider | mount | 726 | 700 | 5000 | |
FluentProviderWithTheme | mount | 83 | 77 | 10 | |
FluentProviderWithTheme | virtual-rerender | 73 | 71 | 10 | |
FluentProviderWithTheme | virtual-rerender-with-unmount | 69 | 77 | 10 | |
InfoButton | mount | 11 | 13 | 5000 | |
MakeStyles | mount | 865 | 863 | 50000 | |
Persona | mount | 1758 | 1660 | 5000 | |
SpinButton | mount | 1383 | 1318 | 5000 |
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 3ef92a485889eee5010ed32b8fc1ec1d8127cc44 (build) |
🕵 fluentuiv9 No visual regressions between this PR and main |
ling1726
approved these changes
Aug 25, 2023
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Aug 29, 2023
* master: applying package updates feat: release react-motion as preview (microsoft#29005) fix(react-utilities): click scrollbar should invoke callback in `useOnClickOutside` (microsoft#28965) feat: adds mountNode to DialogSurface and Toaster (microsoft#29003) applying package updates Add IconDirectionProvider to FluentProvider (microsoft#28803)
marcosmoura
pushed a commit
to marcosmoura/fluentui
that referenced
this pull request
Aug 29, 2023
…nClickOutside` (microsoft#28965) * change * chglog * UT
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix issue 1 in #28938
Previous Behavior
In the codesandbox in the original issue: https://codesandbox.io/s/inspiring-fast-5jm9wc?file=/example.tsx
Click scrollbar in the scrollable container does not close the popover
New Behavior
I updated the
useOnClickOutside
to listen tomouseup
instead ofclick
so it can close the popover when clicking the scrollbar.When scrollbar is clicked, these are the events on

document
during capture phase:And on context menu click:

So we can rely on
mouseup
event instead ofclick
.