Launching a modal window from a button within hype header banner working on desktop but not on mobile

So working closely with our developers... we've come across a problem that we hope people will recognise.. at the moment we have a banner at the top of a html page which have certain links (play buttons) and these buttons trigger a modal window external to the Hype banner.. this was done via adding a class 'popup_1' 'popup_2' 'popup_3' etc to each play button and also adding an HTML (data) attribute "data-youtube_url:"
we also added a void (0) function on those play buttons and this all worked perfectly on desktop but not on any mobile device.. as far as we can tell when we click on the play button on the mobile view the JS does not fire on the click event i.e. the click does not happen. we feel like it doesn't trigger we can't work out why the mobile doesn't trigger but the desktop does... does anyone know why this would happen and how to make it trigger on mobile..
thanks in advance max

You may be encountering a pop up blocking behavior in the mobile browser that is restricting the opening of this other window (I assume this is opening a different webpage). If by modal you mean a frame on the same page, then this should work the same on mobile as it does on desktop. One way to troubleshoot this on mobile is to show your error console somewhere on the page to see what's happening: (12.5 KB)

If that doesn't help identify the problem, can you share a simplified example?

Thanks Daniel this is just a standard Modal window (dialogue box) which contains a YouTube vid its not opening up a separate page so let me try to add the error console to trouble shoot it
cheers max

ok the problem was the javascript:void(0) which I added to the button once I removed that everything worked on the mobile devices

1 Like