This 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'"

Answer from Aidan Young on Stack Overflow
🌐
MacRumors
forums.macrumors.com › macrumors community › site and forum feedback
“Open in Background” (new tab) not working on iOS | MacRumors Forums
October 3, 2023 - So it would request the mobile site by default (and probably on new tabs). If I set the Website setting (aA in address bar when visiting the site) to Desktop website the bug was gone. If I set it back to mobile site it would reappear. I had a setting for macrumours to loadDesktop by default. If I set it to mobile it would now also show the bug on my iPad. I could not reproduce this behavior on my iphone. It would always open the link correctly.
🌐
Apple Community
discussions.apple.com › thread › 251244605
Open link in new tab doesn’t work - Apple Community
April 4, 2020 - The feature to open in the background works to. Maybe I am using the wrong feature in the Dutch version of iOS.. Anyway I can browse the way I am used to again. ... Tap the link with two fingers. This is a new feature. ... Touch and hold the link, then tap Open in New Tab.
Discussions

Can't Open Link in New Tab on iPad - Apple Community
Learn more here: Open and close tabs in Safari on iPhone. ... iPad Safari won’t open links in new tab I have an iPad 5th gen, After the new update IPadOS 16.3, safari is not opening links in new tab. It used to do it but now it disappeared.. More on discussions.apple.com
🌐 discussions.apple.com
Can’t open links in new tab in Saf… | Apple Developer Forums
Or you can simply tap a link with ... opens it in a new tab in the background. ... Woah, that's so great. How long has this been the case? Can't believe I didn't know about that one! ... Mother of gawd you are my hero.... never knew about this.... and it also works on iOS on the iPhone too. Tip o' the cap sir! ... Ssame here! I hate it! I really hope it's a big because it's nearly impossible to use Safari this way, and the workaround is not at all a ... More on developer.apple.com
🌐 developer.apple.com
March 29, 2022
open pages in new tab not working - Apple Community
I just installed it on my new iMac and I can't get the "open pages in new tab" option to work. It worked just fine on my old Mac mini but not here. More on discussions.apple.com
🌐 discussions.apple.com
January 5, 2018
html - How can I open a url in a new window on safari iphone - Stack Overflow
I have an iPhone 11 and 7 and on both, it does not work. It works just fine on android and pc. I need the URL to be opened in a new window. I need to do this with the onClick since I am using pixi js and it is a pixi container that is being clicked. Setting the href won't help either because I want the page to open in a new tab... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Harding
bill.harding.blog › 2017 › 01 › 22 › whys-open-link-in-new-tab-not-working-in-safari-ios-10-iphone-7
Why’s “open link in new tab” not working in Safari + iOS 10 + iPhone 7? – Relentless Simplicity
After much searching, I eventually learned this behavior isn’t a “bug.” According to Apple, it is the “feature” that they have long been marketing as “3d touch.” That is, your iPhone is now paying attention to how hard your touch your Safari links. If you hold a link “hard,” then, instead of popping up the context menu that allows you to open the link in a new tab, you instead get the obnoxious popup preview of the next page.
🌐
Apple Community
discussions.apple.com › thread › 255213378
Can't Open Link in New Tab on iPad - Apple Community
Turning off iCloud would have nothing to do with how links open when you click on them, Set up iCloud for Safari on all your devices. To open a link in a new tab, you need to do so from the menu by touching and holding the link and selecting "Open in New Tab" when the menu pops up.
🌐
Apple Developer
developer.apple.com › forums › thread › 120033
Can’t open links in new tab in Saf… | Apple Developer Forums
March 29, 2022 - Or you can simply tap a link with two-fingers, this automatically opens it in a new tab in the background. ... Woah, that's so great. How long has this been the case? Can't believe I didn't know about that one! ... Mother of gawd you are my hero.... never knew about this.... and it also works on iOS on the iPhone too. Tip o' the cap sir! ... Ssame here! I hate it! I really hope it's a big because it's nearly impossible to use Safari this way, and the workaround is not at all a replacement
🌐
Apple Community
discussions.apple.com › thread › 8225051
open pages in new tab not working - Apple Community
January 5, 2018 - After all this, and by fiddling around, I have discovered that the problem is not with Safari but with DuckDuckGo. I needed to configure that to open links in new tabs. Sorry for all your trouble and time but thanks again. ... After all this, and by fiddling around, I have discovered that the problem is not with Safari but with DuckDuckGo.
Find elsewhere
🌐
Apple Community
discussions.apple.com › thread › 255761556
Cant open new tabs in safari - Apple Community
I had that issue at one point. It seemed to resolve itself at some point, but I’d recommend opening a new tab the alternate way, which is to drag the bottom tab bar to open a new tab. While not the most convenient, it should be a good workaround for now.
🌐
Apple Community
discussions.apple.com › thread › 251222176
Safari on iPad OS 13.4. Where's Open in New Tab?
Switch this option to OFF and you will see the “Open in New Tab” option. ... I stumbled upon this same problem. I have iOS 13.4.1 By playing around with it I discovered a technique that works and it does NOT involve copying the URL and then hitting the + symbol to open an additional tab.
🌐
iDownloadBlog
idownloadblog.com › home › how to open safari links in new tabs on iphone, ipad, and mac
How to open Safari links in new tabs on iPhone, iPad, and Mac
June 26, 2024 - So if you visit a site and tap to read an article, for example, it’ll open in the same tab. But you can change this. Instead of tapping a link on a webpage, press and hold the link. This will display the shortcut menu. From there, tap Open ...
🌐
Apple Community
discussions.apple.com › thread › 251241801
What happened to open in new tab - Apple Community
April 3, 2020 - At least tell me why when I click on 2 aa there’s nothing saying anything about moving search bar thank u 806 3 ... Open does just that, it opens the link in the current window. Open in Background opens the link in a new tab in the same Safari window. Open in New Window is, well, self explanatory. (Apologies to stedman1 - for using your profile link to illustrate this example) ... A little bit of a change, but using “Open in Background” works.
🌐
GitHub
github.com › brave › brave-ios › issues › 830
Can’t open link a new tab · Issue #830 · brave/brave-ios
February 1, 2019 - Open a new link in a new tab in Brave, on iOS 12.2b, it is not possible by long pressing on the link—since the Open in a new tab is not available. I have to open a new tab and copy&paste the link manually. ... Long pressing on the link provides the option to open the link in a new tab. Reproduces how often: [Easily reproduced, Intermittent Issue] Everytime I use Brave, since a couple of days ago. ... Safari works correctly.
Author   ghost
🌐
Apple Community
discussions.apple.com › thread › 251265393
safari ipados 13.4.1 missing option to “open in new tab”
April 13, 2020 - I just updated both my iPad and my iPhone to the latest update release which is 13.4.1 and since then when I hold down on a link on either device the pop-up menu that comes up is missing the option to open the link in a new tab. Now the links do not open in new tabs they just simply open like ...
🌐
Google Support
support.google.com › chrome › thread › 9295038
Cannot open link in new tab on iPad iOS 13 - Google Chrome Community
July 5, 2019 - Skip to main content · Google Chrome Help · Sign in · Google Help · Help Center · Community · Google Chrome · Terms of Service · Submit feedback · Send feedback on
🌐
iPhone Life
iphonelife.com › how-to › productivity & business
The Quickest Way to Open a New Tab in Safari
November 28, 2022 - Swipe from right to left in the Safari address bar. Keep swiping until you've passed the last open tab. Now a fresh, new tab will pop open!
🌐
Reddit
reddit.com › r/chrome › ios 15 - open in new tab
r/chrome on Reddit: iOS 15 - open in new tab
June 18, 2021 -

With this new iOS 15 update, holding down on something I want to open in a new tab, it used to open a few options. Now, it just hovers and does nothing with no setting to open in new tab.

I'm not sure you'd understand exactly how it is without having seen it yourself but if anyone has any idea as to how to open things in new tabs now with this new update then please let me know :)

🌐
Apple
support.apple.com › en-by › guide › iphone › iph489b9313f › ios
Open and close tabs in Safari on iPhone - Apple Support (BY)
To stay on the current webpage when you open new links in a separate tab, go to Settings > Apps > Safari > Open Links, then tap In Background. You can see which webpages you previously visited in this tab. Go to the Safari app on your iPhone. Touch and hold or . Go to the Safari app on your iPhone.
🌐
Apple Community
discussions.apple.com › thread › 253159942
Google Chrome app, holding down on links … - Apple Community
September 20, 2021 - The Open in New Tab pops up when long pressing on picture links, but text links still select text only. I hope that gets fixed in the next update ... this exact thing is happening to me too, and i even upgraded phones (not because of this, but i was definitely hoping it was a case of an older phone). went from my iphone 8 to a 12 mini this past week, the 8 on 14.8 and the 12 mini on 15 now.