• Resolved guilleliss

    (@guilleliss)


    Hello,

    First of all, this plugin is great, it worked straight forward and does exactly what I needed.

    I am using DIVI theme, I placed the search box in few places, but I am struggling with it when placed in the top bar, that is a fixed navigation menu.

    The search box displays perfectly and it stays in the sticky header when scrolling down, but the results are always displayed on top, in the original position of the top menu. I went through the code a bit and found that the search results are absolute positioned with the page, but not relative to the search box. Is there an easy way to change this so the search results stays always with the search box?

    You can see the example here: https://www.merchandisingstuff.com/

    Thanks in advance !

    Cheers

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hi,

    Yes, I know this issue and will fix in the next release.

    Search results must be absolute positioned with the page in order to be in the top of DOM tree and not to be overlap by other elements.

    Solution is to recalculate position of search result block on scroll event.

    For now you can open assets/js/common.js file, and just after lines

    $(window).on( 'resize', function(e) {
        methods.resultLayout();
    });

    add

    $(window).on( 'scroll', function(e) {
        methods.resultLayout();
    });

    This must help.

    Thread Starter guilleliss

    (@guilleliss)

    It makes total sense with position in the page.

    The solution recalculating position worked like a charm. Thank you very much!

    By the way, I also had to add an extra 9 at z-index, for the .aws-search-result-1 class, being the final z-index: 99999.

    The rest works perfect, Ill wait for an update with these changes!

    Thanks again. I would rate 5 stars again if I could.

    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Place search on fixed navigation menu’ is closed to new replies.