forked from Techsystech/web
[FIX] web_advanced_search - Prevent closure dropdown
An error selecting many2one fields in the Custom filter. When select to add a field "is equal to" and adding an extra condition like the first one, the filter disappears!16.0
parent
815078c662
commit
c7fc1b6ee1
|
@ -15,13 +15,17 @@ patch(Dropdown.prototype, "dropdown", {
|
||||||
onWindowClicked(ev) {
|
onWindowClicked(ev) {
|
||||||
// This patch is created to prevent the closing of the Filter menu
|
// This patch is created to prevent the closing of the Filter menu
|
||||||
// when a selection is made in the RecordPicker
|
// when a selection is made in the RecordPicker
|
||||||
|
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 (
|
if (
|
||||||
$(ev.target.closest("ul.dropdown-menu")).attr("id") !== undefined &&
|
|
||||||
$(ev.target.closest("ul.dropdown-menu")).attr("id") ===
|
$(ev.target.closest("ul.dropdown-menu")).attr("id") ===
|
||||||
$("body > ul.dropdown-menu").attr("id")
|
$(dropdown[i]).attr("id")
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
this._super(ev);
|
this._super(ev);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue