This might be of some help.
window.open(url, '_blank'); not working on iMac/Safari
(I would share this as a comment but don't have enough rep yet.)
Answer from tymcsilva on Stack OverflowThis should work on safari as well, but you can add a target to the link by adding target="_blank". This opens the link in a new tab and should also open in a new window on safari. Here is an example:
<a href="https://example.com" target="_blank">Link text.</a>
In your case wrap the input in a link:
<input
id="googleLink"
style="display: none"
>
If you dont want to do this with html and instead an onclick function, you could also use the onclick="location.href='https://example.com'"
You can try the below
<canvas id="myCanvas" width="200" height="100" style="border: 1px solid #000;" onclick="myFunction('thisURL')"></canvas>
<script>
function myFunction(url) {
window.open(url, '_blank').focus();
}
</script>
Can't open links in new tab in Safari
html - Opening of links in new tab on Safari iPhone - Stack Overflow
Open new Safari window/tab from iOS native
Cannot open a page in a new tab in IOS/Safari | OutSystems
Videos
Modify your browser preference; Edit/Settings (gear icon) -> Preferences -> Tabs and select the Automatically or Always option in the drop-down menu of "Open pages in tabs instead of windows".
It turns out it's a browser preference, which can be edited under Edit -> Preferences -> Tabs and select the Automatically option in the drop-down menu Open pages in tabs instead of windows.