project overlay not working in instagram browser
-
Hey hey,
I ran into an issue with instagram. I noticed that my project overlays are not showing the close "X" button at all.
I guess that instagram opens as an overlay and saw every attempt to click on something as a refresh, which triggered a script I had in place to redirect to the frontpage. The new version of my script below prevents this refresh in the instagram browser. The old script forced a redirect to the frontpage if a refresh happens while a project overlay is open and prevents getting stuck on the overlay with no way back. Everything works fine with the script below, just not when opened in Instagram.
Any idea how I can get the close overlay button back in the instagram browser?Merci
Max<script>
document.addEventListener("DOMContentLoaded", function() {// Detect Instagram Browser
const ua = navigator.userAgent || "";
const isInstagram = ua.includes("Instagram");// Do NOT redirect if Instagram browser is used
if (isInstagram) {
console.log("Instagram browser detected ā no redirect.");
return;
}// Normal redirect only outside Instagram
if (document.body.classList.contains("type-project")) {
window.location.href = "/";
}
});
</script> -

unfortunately the instagram browser is not so good, oftentimes things dont work with it.
i would suggest you disable project overlays for the instagram browser. by using this setting "Disable Project Overlays on Instagram Browser"
-
Thank you. Yes, I saw this setting. It makes no difference whether it's checked or not. There's another issue, the menu is showing and is unresponsive on the project overlay. This could be a solution, if it were clickable. All attempts to remove the menu via js or css failed. it's either gone entirely everywhere or nothing happens.
I suppose, I will have to scrap project overlays everywhere to get a consistent experience. -
Can you please send:
- a link to this forum topic
- your website address
- /wp-admin/ username and password
to: info@laytheme.com
I also code custom websites or custom Lay features.
šæ Email me here: šæ
info@laytheme.com
Our Web Development company: 100k.studio
Want to tip me? https://www.paypal.com/paypalme/arminunruh
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options ā Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it