winsparkle
winsparkle copied to clipboard
Opening links in release notes in new window of the default browser
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
target="_blank"
as in every single other browser in existence.
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]-->
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.
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.
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.