fix RSP-1859 Clicking Breadcrumb MenuItem within Popover in Documentation closes Popover#715
Merged
devongovett merged 2 commits intomasterfrom Jul 11, 2020
Merged
fix RSP-1859 Clicking Breadcrumb MenuItem within Popover in Documentation closes Popover#715devongovett merged 2 commits intomasterfrom
devongovett merged 2 commits intomasterfrom
Conversation
…tion closes Popover Steps to reproduce: 1. open docs site to [https://react-spectrum.adobe.com/react-aria/useListBox.html] 2. click code example link: labelled "AriaListBoxOptions" to open popover 3. within Popover, click "CollectionChildren" link 4. within Popover, click "CollectionElement" link 5. within Popover, click "SectionElement" link 6. within Popover, click "SectionProps" link, Breadcrumbs will collapse to show menu button 7. click Breadcrumbs menu button to expand menu 8. using mouse, click a menu item before the current selection Expected behavior: Menu should close without also closing the Popover, and the contents of the Popover should update based on the selected breadcrumb. Actual behavior: Both the Menu and the Popover close, and focus is not restored correctly to the AriaListBoxOptions link. Diagnosis: The {{onHide}} method for the {{Popover}} gets called when a {{Breadcrumb}} {{Menu}} {{MenuItem}} is clicked, because {{onPointerUp}} on the {{MenuItem}} is interpreted as {{onInteractionOutside}} the {{Popover}}. One possible solution would be to make sure the event target passed to {{onHide}} by {{onInteractionOutside}} is still in the document before closing the {{Popover}} with {{onClose}}.
|
Build successful! 🎉 |
|
Build successful! 🎉 |
devongovett
approved these changes
Jul 11, 2020
This file contains hidden or 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
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.
Closes RSP-1859
✅ Pull Request Checklist:
📝 Test Instructions:
Steps to reproduce:
Expected behavior:
Menu should close without also closing the Popover, and the contents of the Popover should update based on the selected breadcrumb.
Actual behavior:
Both the Menu and the Popover close, and focus is not restored correctly to the AriaListBoxOptions link.
Diagnosis:
The
onHidemethod for thePopovergets called when aBreadcrumbMenuMenuItemis clicked, becauseonPointerUpon theMenuItemis interpreted asonInteractionOutsidethePopover.One possible solution would be to make sure the event target passed to
onHidebyonInteractionOutsideis still in the document before closing thePopoverwithonClose.🧢 Your Project:
Accessibility