Skip to content

Commit

Permalink
Merge commit 'refs/pull/2513/head' of https://github.com/oca/web into…
Browse files Browse the repository at this point in the history
… 16.0-2486
  • Loading branch information
docker-odoo committed May 23, 2023
2 parents fd3cf57 + c7fc1b6 commit 17450d5
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions web_advanced_search/static/src/js/RecordPicker.esm.js
Expand Up @@ -15,12 +15,16 @@ patch(Dropdown.prototype, "dropdown", {
onWindowClicked(ev) {
// This patch is created to prevent the closing of the Filter menu
// when a selection is made in the RecordPicker
if (
$(ev.target.closest("ul.dropdown-menu")).attr("id") !== undefined &&
$(ev.target.closest("ul.dropdown-menu")).attr("id") ===
$("body > ul.dropdown-menu").attr("id")
) {
return;
if ($(ev.target.closest("ul.dropdown-menu")).attr("id") !== undefined) {
const dropdown = $("body > ul.dropdown-menu");
for (let i = 0; i < dropdown.length; i++) {
if (
$(ev.target.closest("ul.dropdown-menu")).attr("id") ===
$(dropdown[i]).attr("id")
) {
return;
}
}
}
this._super(ev);
},
Expand Down

0 comments on commit 17450d5

Please sign in to comment.