Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've had a number of clients get tripped up by the current autocompleteSubmit function in this theme. The attached patch modifies the function so that hitting enter only closes the suggestions popup if the user has interacted with it in some way.
Scenario 1: User tabs to search field, enters keywords, hits enter -> search form is submitted
Scenario 2: User tabs to search field, arrows down to select an autocomplete suggestion, hits enter. -> suggestion pop up is closed and user has to hit enter a second time in order to submit the form
Comment | File | Size | Author |
---|---|---|---|
bootstrap-autocomplete-submit.patch | 860 bytes | BBC | |
Comments
Comment #2
markhalliwellThe current behavior follows core: http://cgit.drupalcode.org/drupal/tree/misc/autocomplete.js?h=7.x#n32
Comment #3
markhalliwellPossible duplicate.