I’d like to use a button to open an external URL (not a page from my web app) in a new tab. I found the GoToURL and to set the second parameter to True, which should work. However, I am finding that this is not working on Safari but did in Chrome. In Safari, I did not see any notification of an attempt to open a new tab (no blocked popup)
me.GoToURL("https://www.google.com/", True)
Using a Link does open a new tab on Safari, but only when I set the URL and Target to NewWindow in Inspector. For the design of my app, I’d like to use a button but will use a Link if that is the way to go. Does anyone know how to get the button.Pressed event with the code above to work on Safari?
What about using a WebLink with the Appearance set to Button?
For security, Safari (and probably others) will block certain APIs when they aren’t called as a direct user action. When you press a button in Xojo, it sends the event to the server, the server executes your code and sends back the outcome to the browser. Safari won’t consider that a “direct user action”.