0

Problem script window.open on iphone and ipad

asked 2019-07-26 23:36:15 +0800

JacopoImm gravatar image JacopoImm
1

Good morning, i have a problem opening a new tab on safari browser with iphone and ipad (versione zk 8.6.2 EE).

for example, this code:

String script = "var popup = window.open('http://www.g**gle.it', \"_blank\");"; Clients.evalJavaScript(script);

on windows and android open new tab on browser, but on ios doesn't work

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-07-30 14:18:43 +0800

cor3000 gravatar image cor3000
6280 2 7

updated 2019-07-30 14:19:07 +0800

Many developers have the same problem not just in ZK. it seems ios doesn't allow that. See:

https://stackoverflow.com/questions/50079636/window-open-doesnt-work-on-safari-ios

https://stackoverflow.com/questions/5649962/how-can-i-indicate-that-a-popup-has-been-blocked-by-safari

The workaround is to render a link the user has to click in order to open the tab/window in a _blank target.

<a href="http://www.g**gle.it" target="_blank"/>

Sorry for no better alternative... there's no negotiation against browser limitations.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2019-07-26 23:36:15 +0800

Seen: 8 times

Last updated: Jul 30 '19

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More