Closed sergeichestakov closed 6 months ago
yes definitely a band-aid 😕 Not sure yet but will keep digging
corresponding web PR: https://github.com/replit/repl-it-web/pull/43941
FYI @szymonkaliski figured it out here: https://github.com/replit/repl-it-web/pull/44658
Why
We've gotten some reports of the desktop app randomly opening pages when unfocused and in the background. I have a feeling this is due to some of our "openExternal" logic around redirecting non-Replit pages (or those not supported in the desktop app) to the user's browser instead. I'm not sure why this would be occurring in the background since this should usually only happen by the user clicking links or something triggering
window.open
but evidently it is. See Slack thread.What changed
Only open external links in the user's browser if the window is actually focused. This will stop tabs from opening when the app is in the background.
Test plan
window.open
in the console when the app is focused -> should still open external links in the browser