Switching tab on iOS mobile browser is not working via a href target or even window.open window focus

I’ve been working on this for 1 week, but no luck I can’t find any answer on this.

I want to switch tab on my browser iOS mobile via javascript or html, I tested it in all browser in mac and android, it’s working as expected. But in iOS mobile it’s not working. I saw some articles that I need to disable popup blocker which I did.

I tried simple way like

<a href="http://mysite.test/test" target="custom_name">go</a> 

this will just create new window but when I clicked it again it doesn’t switch to this tab

const newWindow = window.open(href,"custom_name") 

same thing happens in here.

I also tried

newWindow.focus() 

nothing happens

I read there’s an article that iOS blocked the popup new window for security policy, not sure if this switching of tab is also included in that policy.

Is there a way to do this?

Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.