Closed mollykreis closed 11 months ago
Could I get a second review on this PR? @EisenbergEffect @chrisdholt @nicholasrice
Could I get a second review on this PR? @EisenbergEffect @chrisdholt @nicholasrice
Yep, I've got it pulled down to smoke and validate. Thanks
@chrisdholt, were you able to perform the validation you wanted on this branch?
Pull Request
π Description
Resolves #6835
There is a bug where when clicking on an element in the toolbar focuses the
activeIndex
element before focusing the clicked element. This can lead to visual oddities. This PR is intended to resolve that bug.π« Issues
6835
π©βπ» Reviewer Notes
I changed the toolbar to use the
mousedown
event rather than theclick
event to update the toolbar'sactiveIndex
because themousedown
event is fired beforefocusin
, thus resolving the timing issue wherefocusin
focused the previously focused element prior toclick
focusing the newly focused element.π Test Plan
I wasn't able to write a test that failed prior to my change but passes with it because the issue was a temporary state that was passed through during a
click
operations. However, I wrote two new tests that exercise the modified code path.I also manually tested my change in Chrome, Edge, and Firefox.
β Checklist
General
$ yarn change
Component-specific
β Next Steps
N/A