Form Submission issue after hitting Enter Key

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Form Submission issue after hitting Enter Key

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 1 year, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #41764
    rahultiwari007
    rahultiwari007
    Participant

    Hi there,

    I have set up your plugin to my Staging and Live server and the issue is happening on both of the sites. So, I have provided you with a temporary login URL of the staging site (it will not require Username and Password).

    The issue happening with the MAC platform’s Safari and Chrome browsers, when fillup the search form and hitting the ENTER key from the keyboard. It took me to the home page instead of the search page.

    It’s working properly when I fill up the form and click on the Search button. So, the issue is only when I am hitting ENTER key from Safari and Chrome in the MAC platform. You can get the Search form below URL:

    https://qa.guru.com/help/employer/
    https://qa.guru.com/help/freelancer/

    I myself debugged the issue and found that submit button is placed outside the FORM see the attached screenshot https://prnt.sc/4LJIy3Z7mRNX. This is why the form is not submitted on when I hit Enter button.

    Can you please take a look and resolve it.

    #41780
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    You have a custom code added to the page, which casuses the issue:

        $(document).on('keypress', '.wpdreams_asp_sc.asp_main_container form input[type="search"]', function(event) {
          if(event.which == 13) {
            if(!$(this).val()) return false;
            window.location.href = '/?s='+ $(this).val() + '&type=' + type;
          }
        });

    It is located in wp-content/themes/Guru/js/script.js file.

    Best,
    Ernest Marcinko

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


    #41792
    rahultiwari007
    rahultiwari007
    Participant

    Thanks for the help. It’s working properly,

    #41803
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.