data-turbolinks: false url opening browser in turbolinks-ios

196 views Asked by At

I have my Rails application setup using Turbolinks 5, and have the android application successfully built and shipped and it is working with my data-turbolinks="false". I am starting the iOS application and everything appears to be working except the data-turbolinks="false" links which end opening Safari instead of doing their javascript function tied to the link.

Is this not handled in Turbolinks for IOS and I need to handle myself? I followed the demo application pretty closely to get started. I am new to Swift and iOS. I can edit with any code needed. Any help is appriciated, Thank You.

1

There are 1 answers

0
Ryan Condron On BEST ANSWER

I found a way to do this. Since, these are event links you just need to attach click event to prevent the default. like so

$('.event-link').click(function(e) {
 e.preventDefault();
})

Now apply the event-link class to the link.