winsparkle icon indicating copy to clipboard operation
winsparkle copied to clipboard

Opening links in release notes in new window of the default browser

Open pparekh7 opened this issue 6 years ago • 4 comments

I'm using WinSparkle 0.6.0 and currently testing our app on a Windows 10 system. We have a link in our release notes that when clicked displays the page using the browser control. What I would like is for it to open in a new window of the default browser.

I've played with a couple of apps that use WinSparkle and they both have the expected behavior. I can't seem to find an obvious way to configure this behavior. Can anyone point me in the correct direction?

Thanks, Priyanka

pparekh7 avatar Aug 20 '18 22:08 pparekh7

target="_blank" as in every single other browser in existence.

vslavik avatar Aug 21 '18 07:08 vslavik

target="_blank" as in every single other browser in existence.

...except Sparkle's: https://github.com/sparkle-project/Sparkle/issues/430. This was an issue for us because we use the same release notes for both Sparkle and WinSparkle. We worked around it by using a conditional comment:

<!--[if IE]><base target="_blank"><![endif]-->

geraldcombs avatar Jan 16 '20 00:01 geraldcombs

I’m pretty sure I used target="_blank" with Sparkle in the past, but I may be mistaken. This of course changes the situation, reopening.

vslavik avatar Jan 16 '20 06:01 vslavik

So, this is one of those things that are much more complicated than they sound: https://stackoverflow.com/questions/2925279/iwebbrowser2-how-to-force-links-to-open-in-new-window

Using DISPID_BEFORENAVIGATE2 may be OK in the limited situation of release notes. There's a more complicated solution described in the above link too.

vslavik avatar Feb 12 '20 17:02 vslavik

Note also that it appears that target="_blank" launches MSIE, not user's default browser, when using the WebBrowser control - see https://github.com/vslavik/winsparkle/issues/227#issuecomment-1280037864.

vslavik avatar Oct 18 '22 08:10 vslavik