Skip to content

Commit

Permalink
! Fix searching in channel view broken (#3062)
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE authored Jan 14, 2023
1 parent 3e80e96 commit 5f522d5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/renderer/views/Channel/Channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -682,13 +682,14 @@ export default Vue.extend({
}

const currentTabNode = document.querySelector('.tabs > .tab[aria-selected="true"]')
// `newTabNode` can be `null` when `tab` === "search"
const newTabNode = document.getElementById(`${tab}Tab`)
document.querySelector('.tabs > .tab[tabindex="0"]').setAttribute('tabindex', '-1')
newTabNode.setAttribute('tabindex', '0')
newTabNode?.setAttribute('tabindex', '0')
currentTabNode.setAttribute('aria-selected', 'false')
newTabNode.setAttribute('aria-selected', 'true')
newTabNode?.setAttribute('aria-selected', 'true')
this.currentTab = tab
newTabNode.focus({ focusVisible: true })
newTabNode?.focus({ focusVisible: true })
},

newSearch: function (query) {
Expand Down

0 comments on commit 5f522d5

Please sign in to comment.