title: Strange behaviour on safari in Iphone when opening custom created .ics file
body: <p>I'm creating custom .ics file with javascript. when I try to open it in my desktop it works good, but when I open it with with safari on my Iphone it has a weird behaviour in which it open a new screen to add the event to calendar, but it is closed immediately.
  See video: <a href="https://vimeo.com/267547030" rel="nofollow noreferrer">https://vimeo.com/267547030</a></p>
  
  <p>This is the code:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;a id="test"&gt;Demo&lt;/a&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>  var icsMSG = "BEGIN:VCALENDAR\n" +
  "VERSION:2.0\n" +
  "PRODID:-//www.marudot.com//iCal Event Maker\n" +
  "CALSCALE:GREGORIAN\n" +
  "BEGIN:VTIMEZONE\n" +
  "TZID:Asia/Damascus\n" +
  "TZURL:http://tzurl.org/zoneinfo-outlook/Asia/Damascus\n" +
  "X-LIC-LOCATION:Asia/Damascus\n" +
  "BEGIN:STANDARD\n" +
  "TZOFFSETFROM:+0300\n" +
  "TZOFFSETTO:+0200\n" +
  "TZNAME:EET\n" +
  "DTSTART:19701030T000000\n" +
  "RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1FR\n" +
  "END:STANDARD\n" +
  "BEGIN:DAYLIGHT\n" +
  "TZOFFSETFROM:+0200\n" +
  "TZOFFSETTO:+0300\n" +
  "TZNAME:EEST\n" +
  "DTSTART:19700327T000000\n" +
  "RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1FR\n" +
  "END:DAYLIGHT\n" +
  "END:VTIMEZONE\n" +
  "BEGIN:VEVENT\n" +
  "DTSTAMP:20180502T071600Z\n" +
  "UID:20180502T071600Z-1723765681@marudot.com\n" +
  "DTSTART;TZID=\"Asia/Damascus\":20180509T120000\n" +
  "DTEND;TZID=\"Asia/Damascus\":20180510T120000\n" +
  "SUMMARY:scaxczads\n" +
  "END:VEVENT";
  
    $('#test').click(function () {
      window.open( "data:text/calendar;charset=utf8," + escape(icsMSG));
    });
  </code></pre>