Lightbox doesn’t work correctly wtih AMP
-
Hi! Testing your plugin.
- First, I checked site: Here is a link to the canonical page: https://nelelektro.com/catalog/пма-4100-110в/ Here is a link to the mobile version of the page: https://nelelektro.com/catalog/пма-4100-110в/mobile/
- Code: [su_lightbox type=”inline” src=”#contact-form”] формой.[/su_lightbox][su_lightbox_content id=”contact-form”][forminator_form id=”5875″][/su_lightbox_content]
a) on desktop it seems to work fine
b) if I use “responsive view” (checked in Chrome and Firefox) on desktop – I am automatically redirected to AMP version and the link to open the form doesn’t work at all
c) if I use real mobile device (Android smartphone) – initially I’m redirected to AMP version and the very same issue happens, link just doesn’t work; if I force browser to use “computer version” (so “full”, non-amp version) it actually does the same until I hard-refresh the page.- Then I tested the same on my own setup with another form; I installed WP Shortcodes Ultimate plugin and added the same shortcodes that you shared to the page, then I repeted the same tests and I was able to replicate it all.
So I changed the lightbox – first replacing form shortcode with just a test and then using a different lightbox shortcode (example that I took from WP Shortcodes Ultimate docs) – and in both cases the same thing happened.
All in all, it all comes down to the lightbox and AMP – that lightbox doesn’t work correctly wtih AMP, regardless of what is inside it (so doesn’t even have to be the form).
As for the button rendered “outside”, this would be a matter of a local CSS conflict.
I also tested some other “popup” plugins and it’s the same. In general, it is related to how AMP handles JS.
Your comments?
Best regards,
DenisThe page I need help with: [log in to see the link]
The topic ‘Lightbox doesn’t work correctly wtih AMP’ is closed to new replies.