• Resolved positivit

    (@positivit)


    Is there a way to disable return on search field?

    There is a previous post about this marked as resolved.

    Thanks,

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

    We will fix this for sure in our coming release.Thanks for the catch.

    Kind Regards.

    Hey Team,

    Any updates on disabling the submit action on the search bar? It seems redundant letting the user submit their search terms if results automatically show up as they type their query.

    Please let us know when we can expect a fix for this?

    Thanks

    While this issue is being worked on, you can use this work around: use a JavaScript event listener to listen for the enter key being pressed from the Helpie FAQ search box and cancel the event from propagating (and refreshing the page). Works like a charm.

    If you are using Elementor, simply include the script below using the HTML Code widget in Elementor on each page you have the Helpie FAQ widget.

    If you are using a normal WordPress page/post to display the Helpie FAQ widget, you can use Code Embed plugin to insert the JS code below. It’s free. Follow the instructions on the Code Embed plugin page to see how to insert JavaScript in a WP page/post.

    <script>
      window.addEventListener('keydown', function(e) {
        if (e.keyIdentifier == 'U+000A' || e.keyIdentifier == 'Enter' || e.keyCode == 13) {
          if (e.target.className === 'search__input live-search-box') {
            e.preventDefault();
            return false;
          }
        }
      }, true);
    </script>
    • This reply was modified 4 years, 9 months ago by pwewegama.

    Hi There,

    Thank you for being kind enough to give us the solution. We have already fixed this in our development and build is in the testing process. This new version will be released within this week.

    Once again, thanks much for your help. We really appreciate it.

    Kind Regards.

    Thank you for following up on this. I look forward to the new release!

    @pauplesupport – Thank you for the new release. I noticed that it hasn’t been tested with the latest version of WP according to the ReadMe file. Is it safe to use it with WP 5.4.1?

    Hi,

    Sorry. The readme txt file has to be updated.

    The plugin has been tested with latest version of WordPress and is safe to work.

    Thanks for the catch. We will update it soon.

    Kind Regards.

    @pauplesupport Perfect. Thank you!

    @pauplesupport I have updated and everything is working as it should!

    However, there seems to be errors being generated in the console log if the search query includes any spaces. More specifically, the errors occur the for all characters entered in after a space.

    From what I can tell, this error does NOT affect the user experience in anyway, but I thought I should let you know in case it causes any trouble down the road.

    Here is an example of typing in “What is” into the search bar. The errors start right after typing in the ‘i’ of the word ‘is’:

    Uncaught Error: Syntax error, unrecognized expression: [data-search-term *= what is]
        at Function.ea.error (jquery.js?ver=1.12.4-wp:2)
        at ea.tokenize (jquery.js?ver=1.12.4-wp:2)
        at ea.compile (jquery.js?ver=1.12.4-wp:2)
        at ea.select (jquery.js?ver=1.12.4-wp:2)
        at ea (jquery.js?ver=1.12.4-wp:2)
        at Function.ea.matches (jquery.js?ver=1.12.4-wp:2)
        at Function.n.filter (jquery.js?ver=1.12.4-wp:2)
        at z (jquery.js?ver=1.12.4-wp:2)
        at a.fn.init.filter (jquery.js?ver=1.12.4-wp:2)
        at HTMLElement.<anonymous> (main.bundle.js?ver=0.8:474)
        at Function.each (jquery.js?ver=1.12.4-wp:2)
        at a.fn.init.each (jquery.js?ver=1.12.4-wp:2)
        at Object.onSearchKeyup (main.bundle.js?ver=0.8:457)
        at HTMLInputElement.<anonymous> (main.bundle.js?ver=0.8:507)
        at HTMLInputElement.dispatch (jquery.js?ver=1.12.4-wp:3)
        at HTMLInputElement.r.handle (jquery.js?ver=1.12.4-wp:3)

    Hi There,

    Thanks for the catch. I was able to reproduce this in my local.

    I have added this to our bug tracker and have also conveyed to my development team about this. I will make sure to let you know once there is a fix pushed up.

    Kind Regards.

    @pauplesupport Thank you for your support! It’s much appreciated.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Disable return on search, as it reloads page’ is closed to new replies.