Virtualized list items get refocussed when recreated#15604
Virtualized list items get refocussed when recreated#15604markhicken wants to merge 2 commits intodesktop:developmentfrom
Conversation
|
@niik would you mind kicking the workflows for me or let me know who can? |
|
Hey @markhicken, sorry for the late response. Thanks so much for wanting to contribute a fix to this long standing and annoying issue! While reviewing your changes I wanted to see if there was a way for us to combine this work with a fix so that keyboard navigation continues to work, that's the way the List component was intended to work and the reason why the Grid component has a tabIndex (for programmatic focus). I took a stab at this in #15641 and added you as a co-author, please take a look at those changes and see if they make sense to you. In the meantime I'll close this PR as superseded by #15641 but if that work doesn't make it for some reason we can always reopen this. |
Closes #issue 2957
Description
As described in the issue, virtualized list items lose focus when scrolled out of view (because they are unmounted).
See comments with screenshots below...
Screenshots
When scrolled back into view, this PR refocuses them.
We only want to restore focus if it was unintentionally lost. We'll keyboard tab away from the list to validate this.
Note that up and down keys still work as expected after refocussing.
Release notes
Notes: