As a workaround, I added the following JavaScript (and also added the 'modaltrigger' class to the shapes):
$( document ).ready(function() {
jQuery (".modaltrigger").each(function(){
var id = $(this).attr('data-remodal-target');
eval('window.' + id + ' = jQuery ("[data-remodal-id=" + id + "]").remodal();');
});
});
jQuery (".modaltrigger").click(function(){
var id = $(this).attr('data-remodal-target');
eval('window.' + id + '.open();');
});
This simply initiates Remodal on the shapes and binds the click event, similar to what I expect Remodal already does but in a way that apparently works better on iOS.
If you use this workaround, you'll want to remove the 'remodal' class from your modal popups to avoid duplicate triggering.
The following HTML snippet worked fine on desktop and emulated iOS (in Chrome), however on an actual iPad the SVG shapes wouldn't trigger the modals.
As a workaround, I added the following JavaScript (and also added the 'modaltrigger' class to the shapes):
This simply initiates Remodal on the shapes and binds the click event, similar to what I expect Remodal already does but in a way that apparently works better on iOS.
If you use this workaround, you'll want to remove the 'remodal' class from your modal popups to avoid duplicate triggering.