Skip to content

Focus next item in list after removing breakpoint#96287

Merged
isidorn merged 2 commits intomicrosoft:masterfrom
ChrisPapp:focus_after_remove
May 4, 2020
Merged

Focus next item in list after removing breakpoint#96287
isidorn merged 2 commits intomicrosoft:masterfrom
ChrisPapp:focus_after_remove

Conversation

@ChrisPapp
Copy link
Contributor

This PR fixes #96074

if (this.isBodyVisible()) {
this.updateSize();
if (this.list) {
const lastFocusIndex = this.list.getFocus()[0];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lastFocusIndex can be undefined, since getFocus can return an empty array.
Also do not check against equality with -1.

@isidorn
Copy link
Collaborator

isidorn commented Apr 28, 2020

@ChrisPapp thanks for this PR. I left some comments, once you address them we can merge this in.
Assigning to May since we are now in the endgame week and we do not accept any new features this week, only testing.

@isidorn isidorn added this to the May 2020 milestone Apr 28, 2020
@ChrisPapp ChrisPapp requested a review from isidorn May 3, 2020 10:55
@isidorn
Copy link
Collaborator

isidorn commented May 4, 2020

Works nicely. Thanks for this PR, merging in ☀️

@isidorn isidorn merged commit 4f1e2f0 into microsoft:master May 4, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jun 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After 'remove breakpoint' command, select next item in list instead of nothing/top

2 participants