Modal dialog redirects when on the same page as a webform, only for iPhone & iPad

by Janey   Last Updated January 16, 2018 15:07 PM

I have this issue on (iPhone & iPad only - other devices seem to work) where the modal dialog opens but then immediately goes to the url in the link and I only have this issue when it is on the same page as a webform. ie. it works fine on the home page where no webform is present.

This is the link I have in a custom block which appears on all pages:

<a class="use-ajax" data-dialog-options="{&quot;title&quot;: &quot;Leave your details and we'll call you back&quot;}" data-dialog-type="modal" href="/form/call-me-back" id="test-dialog">Call me back</a>

I've made sure I've included 'core/drupal.dialog.ajax' and 'core/jquery.ui.dialog' libraries.

Has anyone else come across this issue? I'm not sure whether the issue lies with webform, iOS devices, or Core.

Related Questions

Drupal 8: Modal Error Messages Displaying on Main page

Updated November 17, 2017 10:07 AM

Content moderation / workflow breaks modal

Updated November 16, 2017 14:07 PM

Decoding cyrillic %get[] parameter in Ajax form

Updated June 11, 2015 08:03 AM

How to open modal form on page load

Updated April 11, 2015 20:03 PM