Skip to content

Commit

Permalink
BB-22129: Filter manager dropdown menu is immediately closed after tu…
Browse files Browse the repository at this point in the history
…rning on/off a single filter in storefront sidebar (#34947)
  • Loading branch information
lexxcode authored Mar 2, 2023
1 parent 1aec0ef commit c5f9be2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,9 @@ define(function(require, exports, module) {
refresh: () => {
this.selectWidget.onRefresh();
},
beforeclose: () => {
return this.ignoreFiltersUpdateEvents === false;
},
close: () => {
this.selectWidget.onClose();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ define(function(require) {
this._bindHeaderEvents();

const events = ['mousedown', 'clearMenus']
.map(eventName => `${eventName}.${this._namespaceID}`)
.map(eventName => `${eventName}${this._namespaceID}`)
.join(' ');

// close each widget when clicking on any other element/anywhere else on the page
Expand All @@ -81,7 +81,7 @@ define(function(require) {
// restored to their defaultValue prop on form reset, and the reset
// handler fires before the form is actually reset. delaying it a bit
// gives the form inputs time to clear.
$(this.element[0].form).on(`reset.${this._namespaceID}`, () => {
$(this.element[0].form).on(`reset${this._namespaceID}`, () => {
setTimeout(this.refresh.bind(this), 10);
});
},
Expand Down

0 comments on commit c5f9be2

Please sign in to comment.