• Resolved tajmohamed30

    (@tajmohamed30)


    Hi

    Popup auto close documentation snippet not working with iphone as back page never re-loads again instead it displays cached page as it is

    FYI – Im using the popup as preloader for opening products on pages with overlay content only in android webview due to touch response slowness issue

    I don’t want it to reappear once I navigate from shop page to product page when pressed back on iphone (for windows/android no issues at it reloads home page again where as in iphone it simply displays cached page on hitting back arrow button) at this point the popup overlay still present and timer starts running to close it which is not required instead close it immediately pressed back button

    (in short: need to start timer on current page itself and close popup and no need it to reappear even if triggered on multiple objects)

    Please let me know if any details required regarding this issue

    Regards

    • This topic was modified 1 year, 4 months ago by tajmohamed30.
    • This topic was modified 1 year, 4 months ago by tajmohamed30.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Kim L

    (@kimmyx)

    Hi @tajmohamed30,

    You can add a cookie on Popup Open to prevent it from reappearing after hitting back on iPhone. Can you try that?

    For example: https://share.getcloudapp.com/ApugXowX

    More information about cookies here: https://docs.wppopupmaker.com/article/358-popup-settings-box-cookies-option-settings

    Hope that helps!

    Plugin Support Kim L

    (@kimmyx)

    Hi there,

    I’m going to mark this as resolved as we haven’t heard from you in a while.

    Feel free to create a new thread if you have other questions.

    Thanks!

    Thread Starter tajmohamed30

    (@tajmohamed30)

    thanks for your reply @kimmyx

    I want to appear pop up for each and every product when clicked them(as I said I’m using it as preloader on android webview due to touch response issue)

    as you mentioned cookie option I have tried but it disables further popups so I think this option won’t satisfy the requirement

    also fyi – you can say what about normal preloaders, the difference is normal preloaders overlay window appears on next page, but I want to achieve overlay window before going to next page (for slower touch response)

    Plugin Support Kim L

    (@kimmyx)

    Hi @tajmohamed30,

    You can set the cookie as a session cookie until the user closes the browser. This will ensure the popup will reappear once triggered for the first time again.

    You can also set your cookie timer to a shorter period (1 minute, 1 hour, etc).

    Or, you can add a Close button somewhere inside the popup so the user can manually close it.

    Would any of the above work?

    Let us know if you have more questions.

    Thread Starter tajmohamed30

    (@tajmohamed30)

    Im triggering blank overlay popup at same time going to product page (once clicked any product from homepage)

    Issue – when pressed back button, popup remains at home page

    Solution – On going back page triggered the refresh, I have achieved with below snippet

    
    function custom_js_snippet() {
        ?>
        <script>
        jQuery(document).ready(function($) {
            // Check if the current page is the home page
            function isHomePage() {
                return window.location.pathname === '/';
            }
    
            // Refresh the page when the back button is pressed to return to the home page
            window.addEventListener('pageshow', function(event) {
                if (event.persisted && isHomePage()) {
                    location.reload();
                }
            });
        });
        </script>
        <?php
    }
    add_action('wp_footer', 'custom_js_snippet');
    

    you can mark as resolved

    thanks

    Plugin Support Kim L

    (@kimmyx)

    Hi @tajmohamed30,

    Thank you so much for sharing your solution! ??

    We’ll mark this thread as resolved now.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Need close pop up after clicked back on iphone’ is closed to new replies.