This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Ajax Search Pro not working inside an Elementor Popup

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Ajax Search Pro not working inside an Elementor Popup

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #23668
    ArnauArnau
    Participant

    Hi there,

    Ajax Search Pro is working fine with Elementor, except if the search form is inside a popup created with Elementor Pro. In this case, there are not automatic results shown.

    In the URL there are 2 Ajax forms: One in the middle of the page, wich is working fine, and another inside an Elementor Popup that can be opened clicking in the magnifying glass icon in the header. This is not working.

    The search form is the same in both cases.

    Is there a way to solve ti?

    Thanks,

    Arnau

    #23671
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi Arnau,

    Thank you for all the details! Since you added temporary FTP and back-end details, I have fixed the issue by adding a small custom code snippet to the functions.php file in your theme directory.

    The problem is, that elementor always clones the pop-up contents, which basically resets the event handlers, thus it won’t work. The code checks when the icon is clicked, and tries to re-initialize the plugin, and should bypass the problem.

    For future reference, this is the custom code:

    add_action('wp_footer', 'asp_fix_fa_icon_click');
    function asp_fix_fa_icon_click() {
      ?>
      <script>
      jQuery(function($){
        $('.fa.fa-search').on('click', function(){
          setTimeout(function(){
            ASP.initialize();
          }, 500);
        });
      });
      </script>
      <?php
    } 
    #23683
    ArnauArnau
    Participant

    Hi Ernest,

    Thanks a lot for this great and fast solution!

    #23684
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    #23690
    ArnauArnau
    Participant

    You cannot access this content.

    #23691
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Thank you!

    I am not sure if I can replicate that issue. I tried closing the pop-up with the X button, as well as by clicking on the document, but the results close as well. Is this happening in a specific way?

    #23699
    ArnauArnau
    Participant

    Hi Ernest.
    I can’t replicate the issue also. It seems to work fine.

    Thanks a lot, again!

    #23700
    ArnauArnau
    Participant

    You cannot access this content.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.