gcollazo / BrowserRefresh-Sublime

This plugin will switch from ST2 and ST3 to Google Chrome, Google Chrome Canary, Safari, Firefox or Opera and reload the active tab
http://gcollazo.github.com/BrowserRefresh-Sublime
565 stars 61 forks source link

Safari starting up on refresh #68

Closed waldbach closed 9 years ago

waldbach commented 9 years ago

There seems to be a bug where Safari (on a Mac) starts up when it's not running on refresh. The currently running browser (in my case Firefox Developer Edition) is refreshing after launching Safari. For now, as a temporary workaround, I commented out Safari, since I don't use that for testing.

In BrowserRefresh.py I commented out:

        elif browser_name == 'all':
            refresher.chrome()
           # refresher.safari()
            refresher.firefox()
            refresher.opera()
charlesmudy commented 9 years ago

+1

stuartwan commented 9 years ago

I guess the reason is that you have some applications like Slack opened - which is using the Safari browser. So if your config is

"browser_name" : "all"

It will also open a Safari window and try to refresh.

I specified a browser_name in sublime settings and it's ok now.

"browser_name" : "Google Chrome"
chrleon commented 9 years ago

How would I go about making the plugin refresh both chrome and safari, if I'm not setting the prefs to "all"

gcollazo commented 9 years ago

@chrleon The plugin is supposed to refresh all open browsers when set to "all". Currently it seems that Safari is starting on refresh because the plugin is wrongfully detecting Safari running when it's not.

There's no way to specify 2 specific browser to refresh but that seems like a great fix for this particular issue.

I propose removing the "all" option and replacing the "browser_name" option for something like this

"browsers": ["chrome", "firefox"]

This way you could recreate the "all" option by listing all the browsers you want and we could remove the running browser logic from the plugin.

chrleon commented 9 years ago

Yes I tried that, but it still fired Safari. I'll have a look again, and see if I (likely) messed something up, before I posted.


Either we are alone in the Universe or we are not. Both are equally terrifying. – A.C Clark

On Mon, Jun 29, 2015 at 1:46 PM, Giovanni Collazo notifications@github.com wrote:

@chrleon https://github.com/chrleon The plugin is supposed to refresh all open browsers when set to "all". Currently it seems that Safari is starting on refresh because the plugin is wrongfully detecting Safari running when it's not.

There's no way to specify 2 specific browser to refresh but that seems like a great fix for this particular issue.

I propose removing the "all" option and replacing the "browser_name" option for something like this

"browsers": ["chrome", "firefox"]

This way you could recreate the "all" option by listing all the browsers you want and we could remove the running browser logic from the plugin.

— Reply to this email directly or view it on GitHub https://github.com/gcollazo/BrowserRefresh-Sublime/issues/68#issuecomment-116625058 .

gcollazo commented 9 years ago

I'm preparing a fix for this... will publish later today

gcollazo commented 9 years ago

Just pushed the update, it should be available soon. Make sure you update your settings.