-
Notifications
You must be signed in to change notification settings - Fork 601
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 bug in toolbar click handler when a slotted element has child elements #6830
Fix bug in toolbar click handler when a slotted element has child elements #6830
Conversation
Could someone take a look at this PR or provide an estimate of when it might get reviewed? Thanks |
Any update on when this PR might get some attention? |
I'll take a look in the next day or two, thanks @mollykreis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for the tests @mollykreis. I'll update the change file.
change/@microsoft-fast-foundation-2ada25c3-3fb4-48ba-893d-e64d11f7f095.json
Outdated
Show resolved
Hide resolved
…ments (microsoft#6830) * Fix bug with nested elements in toolbar click handler * Change files * lint * update change description * slight test improvement * Update change/@microsoft-fast-foundation-2ada25c3-3fb4-48ba-893d-e64d11f7f095.json --------- Co-authored-by: Chris Holt <[email protected]>
* Fix bug in toolbar click handler when a slotted element has child elements (#6830) * Fix bug with nested elements in toolbar click handler * Change files * lint * update change description * slight test improvement * Update change/@microsoft-fast-foundation-2ada25c3-3fb4-48ba-893d-e64d11f7f095.json --------- Co-authored-by: Chris Holt <[email protected]> * Fix toolbar focus bug (#6836) * Fix focus issue when clicking on an element in the toolbar * remove describe.only * Change files * Update api-report.md * Update change/@microsoft-fast-foundation-903a969b-3de3-4090-974a-3423344c571c.json --------- Co-authored-by: Chris Holt <[email protected]> * update change files * revert unintended change --------- Co-authored-by: Chris Holt <[email protected]>
…ments (#6830) * Fix bug with nested elements in toolbar click handler * Change files * lint * update change description * slight test improvement * Update change/@microsoft-fast-foundation-2ada25c3-3fb4-48ba-893d-e64d11f7f095.json --------- Co-authored-by: Chris Holt <[email protected]>
Pull Request
📖 Description
Resolves #6819
When an element in the toolbar is clicked, the toolbar's
activeIndex
should update to be the index of that clicked item. However, there is a bug where this does not happen if a child element within the slotted element is clicked. This PR is intended to resolve that bug.🎫 Issues
#6819
👩💻 Reviewer Notes
I've updated the
clickHandler
for the toolbar to searchfocusableElements
for an entry that contains the clicked element rather than an entry that is the clicked element. No other logic has changed.📑 Test Plan
I've added two additional tests for the toolbar:
activeIndex
updates when an element slotted into the toolbar is clicked (passed with & without this change)activeIndex
updates when a nested element within an element slotted into the toolbar is clicked (failed without this change & passes with this change)✅ Checklist
General
$ yarn change
Component-specific
⏭ Next Steps
N/A