diff options
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/src/toaster.tsx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/frontend/src/toaster.tsx b/frontend/src/toaster.tsx index 3fe2e87e..2103da5f 100644 --- a/frontend/src/toaster.tsx +++ b/frontend/src/toaster.tsx @@ -46,15 +46,27 @@ class Toaster extends Logger { return false; }); - const focusWorkaroundPatch = replacePatch(focusManager.prototype, 'BFocusWithin', function () { + const overrideFocus = function () { // @ts-ignore - if (this.m_node?.m_element && this.m_node?.m_element.classList.contains(staticClasses.TabGroupPanel)) { + self.debug(this.m_node.m_element); + // @ts-ignore + const classList = this.m_node?.m_element.classList; + if ( + // @ts-ignore + (this.m_node?.m_element && classList.contains(staticClasses.TabGroupPanel)) || + classList.contains('FriendsListTab') || + classList.contains('FriendsTabList') || + classList.contains('FriendsListAndChatsSteamDeck') + ) { self.debug('Intercepted friends re-focus'); return true; } return callOriginal; - }); + }; + + const focusWorkaroundPatch = replacePatch(focusManager.prototype, 'TakeFocus', overrideFocus); + while (true) { instance = findInReactTree( (document.getElementById('root') as any)._reactRootContainer._internalRoot.current, |
