[FIX] web: popovers do close correctly in kanban
This commit fixes a bug where popovers could stack up in kanban if one kept opening them. By changing the event to close popovers from a mousedown event to a pointerdown event, it is no longer stopped by the draggable hook and executes correctly. closes odoo/odoo#136890 X-original-commit: 76665eb400168a6fd6e2b5f5fe099c8c4e9c8a5e Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com> Signed-off-by: Julien Carion (juca) <juca@odoo.com>
This commit is contained in:
@@ -24,7 +24,7 @@ export class PopoverController extends Component {
|
||||
setup() {
|
||||
if (this.props.target.isConnected) {
|
||||
this.popoverRef = useChildRef();
|
||||
useExternalListener(window, "mousedown", this.onClickAway, { capture: true });
|
||||
useExternalListener(window, "pointerdown", this.onClickAway, { capture: true });
|
||||
useHotkey("escape", () => this.props.close());
|
||||
const targetObserver = new MutationObserver(this.onTargetMutate.bind(this));
|
||||
targetObserver.observe(this.props.target.parentElement, { childList: true });
|
||||
|
||||
Reference in New Issue
Block a user