• When click on [more info] in Chrome, it doesnt scroll up to the map. but it works in Safari.

    I would also like to do the same (Scroll to map and open info box) if someone clicked on the location Title in the list.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi there,

    I am unable to reproduce the behaviour you describe. The More Info link never takes me back to the map (it is not supposed to, anyway) on Chrome, Safari, Firefox or even Mobile Safari. Could you please.

    The more info link is intended to show additional info such as phone, fax, email, opening hours, etc.

    If you have a custom template with a different behaviour for the more info link, let us know and we will take a look.

    The same applies to the Location Title. The default behaviour is to go to the individual store page unless you have modified the template to include some other link.

    So.. I am sorry but I don’t quite understand the nature of your query, could you please elaborate a little bit?

    Regards,

    Thread Starter okose1

    (@okose1)

    In the settings under User Experience, where it asks [Where do you want to show the “More info” details?] i selected [In the info window on the map] which works fine. but the page doesnt scroll up to the map. i tested this also using the list below map template.
    i also tested this in Safari and safari scrolls back up to the map.
    Thanks in advance for your help.
    p.s. I didnt change any behaviour for the more info link

    Hi again,

    Oh, I see, I didn’t remember that setting ([In the info window on the map]), sorry.

    Well, the thing is… I still cannot reproduce that behaviour in either Chrome, Safari or Firefox. Not with a test site nor with your URL… You mentioned it was working for you in Safari, what version are you using? I’m on Safari 15.2 and the behaviour is the same as in every other browser. The popup window opens, but the page does not scroll to the top (?)

    Any thoughts?

    Thread Starter okose1

    (@okose1)

    oh i’m using 14.1.2.

    Is it possible to also have the location title (in the list) open the popup on the map instead of permalink?

    regarding the scroll issue; I looked at other plugins and i think its called Scroll to Map. Hoping this can be put as a feature for those who use the list below map template as it makes more sense for this feature.

    Thanks so much for your help

    Hi,

    This is actually pretty simple. If you want to modify the default behaviour for the store title link you can use the filter wpsl_store_header_template and make sure the link is not pointing to an actual URL and it has the class name “wpsl-store-details”. Put something like this in your functions.php file:

    add_filter( 'wpsl_store_header_template', 'custom_store_header_template' );
    function custom_store_header_template() {
        $header_template = '<a class="wpsl-store-details" href="#"><%= store %></a>';
        return $header_template;
    }

    This will trigger the “info window open” instead of linking to the store page itself.

    I hope that helps
    Regards,

    • This reply was modified 2 years, 10 months ago by farroyo.
    Thread Starter okose1

    (@okose1)

    Thanks so much for your help.

    Thread Starter okose1

    (@okose1)

    Just an update. I managed to add some custom jquery to make the page scroll to top after someone clicks on the location and it works. I used:

    $(document).ready(function() {
    $(“#wpsl-stores”).on(“click”, “.wpsl-store-details”, function() {
    $(“html, body”).animate({
    scrollTop: 0
    }, 500)
    });
    })

    It seems to work perfectly. This is the scroll to top i needed that isnt included in the template list under map which it should ideally.

    Thanks

    Hi again,

    It is good to know that you figured that out. I will pass your suggestion on to the dev team because it is a simple feature and maybe they want to include it in a future release.

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Scroll to Map not working in Chrome’ is closed to new replies.