browser icon indicating copy to clipboard operation
browser copied to clipboard

Refresh if URL is already open in browser

Open karlhepler opened this issue 5 years ago • 5 comments

Currently, if browser.OpenURL is invoked multiple times, it will open multiple tabs in the web browser. I'd like to be able to maintain a single invocation, whereby the tab is refreshed if it's already open.

karlhepler avatar May 26 '20 18:05 karlhepler

Thank you for raising this issue. I don't know how to do what you've asked so I'll mark this issue marked help wanted.

davecheney avatar May 27 '20 01:05 davecheney

Thanks. If I figure it out somehow, I’ll submit a PR. Hopefully someone else can beat me to it! ;-)

karlhepler avatar May 27 '20 01:05 karlhepler

I haven't looked through it yet, but Facebook's create-react-app does this with their dev utils and might be a good resource to lead us in the right direction.

https://github.com/facebook/create-react-app/blob/master/packages/react-dev-utils/openBrowser.js

karlhepler avatar May 27 '20 20:05 karlhepler

i think @karlhepler lead is a good one.

i also came across this issue: https://bugs.chromium.org/p/chromium/issues/detail?id=141942

and i hope this can be solved by using specific browser commands (this might cover more use cases then just chromium on OSX)

buzzdan avatar Apr 01 '21 08:04 buzzdan

I haven't looked through it yet, but Facebook's create-react-app does this with their dev utils and might be a good resource to lead us in the right direction.

https://github.com/facebook/create-react-app/blob/master/packages/react-dev-utils/openBrowser.js

it appears that Facebook uses open under the hood, which itself utilizes xdg-open.

servusdei2018 avatar May 11 '24 04:05 servusdei2018