Skip to content

Commit e5ad1fb

Browse files
author
Stanislav Idolov
authored
ENGCOM-3067: [Forwardport] fix: reset search mini-form when we have no data / an empty response #18312
2 parents 5885dc7 + 2cefcb7 commit e5ad1fb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/code/Magento/Search/view/frontend/web/js/form-mini.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,13 @@ define([
306306
dropdown.append(html);
307307
});
308308

309+
this._resetResponseList(true);
310+
309311
this.responseList.indexList = this.autoComplete.html(dropdown)
310312
.css(clonePosition)
311313
.show()
312314
.find(this.options.responseFieldElements + ':visible');
313315

314-
this._resetResponseList(false);
315316
this.element.removeAttr('aria-activedescendant');
316317

317318
if (this.responseList.indexList.length) {
@@ -338,6 +339,11 @@ define([
338339
this._resetResponseList(false);
339340
}
340341
}.bind(this));
342+
} else {
343+
this._resetResponseList(true);
344+
this.autoComplete.hide();
345+
this._updateAriaHasPopup(false);
346+
this.element.removeAttr('aria-activedescendant');
341347
}
342348
}, this));
343349
} else {

0 commit comments

Comments
 (0)