fregante / GhostText

👻 Use your text editor to write in your browser. Everything you type in the editor will be instantly updated in the browser (and vice versa).
https://GhostText.fregante.com
MIT License
3.25k stars 116 forks source link

Option to NOT focus the browser tab on disconnect #243

Closed eugenesvk closed 1 year ago

eugenesvk commented 1 year ago

Setup

Browser: Vivaldi 5.6.2 (Chromium-based), but similar in Chrome Editor: Sublime Text 4147

Description

I'd like to have an option for my Editor to remain in focus when I close the tab with GhostText content, so to basically disable the call to focuse the editing tab in the browser on disconnect.

My usual workflow is I'd only post/submit directly from the web-form since I'd usually preview (e.g., like in these GitHub comments) the final output. So that post/submit even is for me what ends the GhostText session, not the editor tab close. However, sometimes GH doesn't disconnect on submit, so when I switch back to the Editor to do something else and close the tab that's no longer needed, I get switched back to the browser, which I don't need anymore, so I have to switch back again (though it seems that this is only happening on a Mac, on Windows the browser is just highlighted in the toolbar, but doesn't get focused).

Also, sometimes when I decide not to post anything and just abort the GhostText session by closing the Editor tab, it's rare that I want to jump back to the editing page, I don't mind that there is some dangling text remaining

Because of this, the forced behavior of switching focus back to the browser on disconnect is unwanted