[FIX] web: kanban quick create with legacy many2one
Have a quick create view in kanban that has a legacy many2one
field (not yet converted to the WOWL framework for some reason).
Click on that many2one to see the dropdown of propositions.
Click on one proposition.
Before this commit, the quick create got closed, because we clicked
somewhere outside of it (the legacy dropdown).
This is a known, quite common issue in some other part of the codebase
(see d3662d370c).
After this commit, the quick create works as expected.
closes odoo/odoo#99241
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
@@ -34,8 +34,12 @@ export class KanbanRecordQuickCreate extends Component {
|
||||
return;
|
||||
}
|
||||
const target = this.mousedownTarget || ev.target;
|
||||
const gotClickedOutside = !this.rootRef.el.contains(target);
|
||||
if (gotClickedOutside) {
|
||||
// accounts for clicking on legacy daterangepicker and legacy autocomplete
|
||||
const gotClickedInside =
|
||||
target.closest(".daterangepicker") ||
|
||||
target.closest(".ui-autocomplete") ||
|
||||
this.rootRef.el.contains(target);
|
||||
if (!gotClickedInside) {
|
||||
let force = false;
|
||||
for (const selector of ACTION_SELECTORS) {
|
||||
const closestEl = target.closest(selector);
|
||||
|
||||
Reference in New Issue
Block a user