Windows.open is not available when iPad Safari/onload.

Asked 2 years ago, Updated 2 years ago, 88 views

function test(){
  window.open("/xxxxx/TEST.PDF", "_blank", "");
}
:
<body onload='test();'>
:

If you use iPad Safari and run the above script, the PDF POPUP screen will not open.
(The body online window.open does not work.)

  • The PC version of Safari works fine and opens the PDF POPUP screen.
  • Click events with the
  • button also open the PDF POPUP screen.
  • The POPUP screen did not appear even if I made it an HTML file instead of a PDF.
  • safari is up to date.
  • The pop block in safari setting is turned off

If there is any solution, please let me know.
Thank you for your cooperation.

javascript safari

2022-09-30 20:22

1 Answers

It's self-less.
I heard that it is a mobile safari specification.
on It seems that the window.open by online does not work.
Thank you for browsing.

*Reference: http://cygx.mydns.jp/blog/?arti=475


2022-09-30 20:22

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.