Skip to content

Commit 60bfd47

Browse files
committed
Fix for: Submitting search form (mini) with empty value throws error on preventDefault
1 parent 274971a commit 60bfd47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ define([
104104
this.element.on('keydown', this._onKeyDown);
105105
this.element.on('input propertychange', this._onPropertyChange);
106106

107-
this.searchForm.on('submit', $.proxy(function () {
108-
this._onSubmit();
107+
this.searchForm.on('submit', $.proxy(function (e) {
108+
this._onSubmit(e);
109109
this._updateAriaHasPopup(false);
110110
}, this));
111111
},

0 commit comments

Comments
 (0)