mirror of
https://github.com/desktop/desktop
synced 2024-11-05 20:49:32 +00:00
Scope to repoSidebar in case more tab bars added in future
This commit is contained in:
parent
72a10a223b
commit
bbfa90c37b
1 changed files with 4 additions and 2 deletions
|
@ -2752,8 +2752,10 @@ export class AppStore extends TypedBaseStore<IAppState> {
|
|||
}
|
||||
|
||||
if (forceButtonFocus) {
|
||||
const buttons = document.getElementsByClassName('tab-bar-item selected')
|
||||
const button = buttons[0] as HTMLButtonElement
|
||||
const repoSideBar = document.getElementById('repository-sidebar')
|
||||
const button = repoSideBar?.querySelector(
|
||||
'.tab-bar-item.selected'
|
||||
) as HTMLButtonElement
|
||||
button?.focus()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue