-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix supertab freezing the app #6965
base: main
Are you sure you want to change the base?
Conversation
When are you experiencing this infinite loop error? |
Whenever the main UI is not on screen, like when the app is starting up, or before logging in. (Also, it's not an "error"; the app just freezes forever until I force-quit it.) The loop runs forever because the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jamiebuilds-signal self-requested a review last month
Fine, I'll do it myself. 😤
(focusedElement != null && target === focusedElement) || | ||
target.contains(focusedElement) | ||
) { | ||
if (target.contains(focusedElement)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
target.contains(focusedElement)
makes the preceding condition pointless because .contains()
allows a null
parameter and considers elements to also contain themselves.
@@ -42,7 +42,7 @@ export function addGlobalKeyboardShortcuts(): void { | |||
return; | |||
} | |||
|
|||
// Super tab :) | |||
// Super tab :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signal Spirits haunt this codebase. Let the frown scare them away.
Removes the infinite, app-freezing while-loop and handles the now-reachable errors.
5ee127f
to
abc6e9c
Compare
First time contributor checklist:
Contributor checklist:
main
branchnpm run ready
run passes successfully (more about tests here)Description
Removes pointless conditions and the infinite, app-freezing while-loop.