Exit buttons in IG Feed pop-up not working

The exit (“X”) buttons on my IG Feed pop-up aren’t working across my website. When I click on those buttons (after opening a pop-up to view a specific post), nothing happens; I’m unable to close out the pop-up. Could someone help with this?

1 Like

Hi there, @Brady_Gilliam :waving_hand:

We’ve fixed the issue with this script added to the Custom JS field on the Settings tab of your widget’s settings:

window.addEventListener('click', (event) => {
    const button = event.target?.closest('.es-popup-close');
    if (button) {
        const enterEvent = new KeyboardEvent('keydown', {
            key: 'Enter',
            code: 'Enter',
            keyCode: 13,
            which: 13,
            bubbles: true
        });

        button.dispatchEvent(enterEvent);
    }
}, true);

Please check it out and let me know if the Close button works fine :slightly_smiling_face:

1 Like

Max, this works perfectly! Thank you so much for your help – I really appreciate it.

2 Likes

It’s my pleasure!

By the way, I’d like to remind you about our Black Friday Contest, where you can win a 12-month extension to your subscription for FREE- BF 2025 Contest: Win 1 FREE YEAR (10 Winners) +1 month guaranteed! :wrapped_gift:

Check the details and join in :wink: