Patching Drupal core (misc/autocomplete.js)
There is an issue in the search box with autocompletion. If the user hit enter at the end of a search term, the expected behaviour would be to start searching. However if the search box is connected to an autocompletion feature, the enter only hides the autocomplete popup, and only the second enter starts the searching. This is a Drupal core behaviour, and since it is not something we can override with the help of the hook system (it is JavaScript functionality), we provided a patch against Drupal core, namely the file misc/autocomplete.js. You can apply the patch with
git apply sites/all/modules/xc/xc_util/patches/xc-autocomplete.patch
or
patch -p1 < sites/all/modules/xc/xc_util/patches/xc-autocomplete.patch
You can find more info about applying patches at Drupal's Patch guide (http://drupal.org/patch/apply) or in case of problems the following page: http://drupal.org/node/1129120.
The patch will change the misc/autocomplete.js file a little bit. The most important change is that instead of the original
}).size() == 0;
you will see
}); // }).size() == 0;
return 1;
around line 29.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion