Stop Focusing on Repl Console During Server Restart

A common issue I have is trying to make changes to a web project and while I’m making the changes and error will occur, causing my HMR server to crash and restart in a loop.

This was “solved” by Replit adding crash-loop protection on webservers but the experience in the IDE is still highly degrading because the cursor automatically focuses on the console as the Repl restarts. This is “intended behavior” when restarting a server once - but in a crash loop it makes it harder to fix a problem.

I would like to propose the change to not remove or change focus of the cursor while it is focused on the editor, regardless of what action is occurring in the IDE. This isn’t really a fleshed out idea and might have other repercussions so let’s throw it around and refine it, but its a compromise from just flat out disabling server restarting via requests.


I’m not involved in the engineering side here but just wanted to get more details. Do you have an example Repl that you can share that does this? (might be tricky I realise)


I think any Repl that uses HMR (so like Vite, a Next.js Repl, Astro, anything really you can find it in (: ).

1 Like

A solution could be only focusing the console when the server starts but only when the user pressed the Run button, so if the server is in a crash loop and it keeps restarting automatically the console doesn’t get focused. This could also be a setting.

1 Like