Skip to content

Commit

Permalink
BB-21151: Filter “By Updated At“ doesn't work when using datepicker i…
Browse files Browse the repository at this point in the history
…n select2 (#31980)
  • Loading branch information
ValeriyYustunyk authored Feb 18, 2022
1 parent e956b7a commit 69f7735
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,18 @@ define(function(require, exports, module) {
Dropdown._clearMenus = function(event) {
if (event && (event.type === 'click' || event.type === 'clearMenus')) {
const $target = $(event.target);
if ($target.closest('[data-toggle]').length && $target.closest('.dropdown-menu.show').length) {
const $openDropdownMenu = $target.closest('.dropdown-menu.show');

if ($target.closest('[data-toggle]').length && $openDropdownMenu.length) {
// click on toggle element inside active dropdown-menu
return;
} else if (
event.type === 'clearMenus' &&
$openDropdownMenu.length &&
$.contains($openDropdownMenu[0], event.target)
) {
// click on custom control inside active dropdown-menu
return;
}

if ($target.closest('.dropdown-menu.show').length) {
Expand Down

0 comments on commit 69f7735

Please sign in to comment.