Prevent page from scrolling behind results with compact layout?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Prevent page from scrolling behind results with compact layout?

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 7 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11519
    equilibrianaturals
    equilibrianaturals
    Participant

    Hi there – I can’t figure out how to prevent the page from scrolling behind the results list when using the compact search layout. When you scroll through the results, once you reach the bottom of the results the page scrolls behind the results list and it moves. It snaps back quickly but I’d rather not have the results “box” or the page behind it move at all. Am I missing a setting somewhere? Any help you can offer would be greatly appreciated! Thanks in advance 🙂

    #11529
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    I’m not sure if this is possible, the scrollbar script might be capable of it. Scroll propagation by definition is not cancellable programatically, there are tricks to get around it, but usually they get patched up on browser updates.

    Anyways, I’ve looked up the script documentation, and there appears to be a way which should work on most browsers. Try putting this custom code to the bottom of the functions.php file in your active theme directory:

    This may not work at all, but it’s worth a try. The scrollbar might be a bit different after this code, as it will fully re-create the scrollbar upon displaying the results. Let’s hope it works 🙂

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.