Skip to content
Snippets Groups Projects
Commit efd634ac authored by Steven Wittens's avatar Steven Wittens
Browse files

- Fix Safari alert when no autocomplete matches are returned.

parent b7a99363
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -249,7 +249,8 @@ ACDB.prototype.search = function(searchString) {
* HTTP callback function. Passes suggestions to the autocomplete object
*/
ACDB.prototype.receive = function(string, xmlhttp, acdb) {
if (xmlhttp.status != 200) {
// Note: Safari returns 'undefined' status if the request returns no data.
if (xmlhttp.status != 200 && typeof xmlhttp.status != 'undefined') {
removeClass(acdb.owner.input, 'throbbing');
return alert('An HTTP error '+ xmlhttp.status +' occured.\n'+ acdb.uri);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment