Skip to content

[FIX] pivot: prevent drag & drop in pivot side panel#8842

Open
hokolomopo wants to merge 1 commit into
saas-19.2from
saas-19.2-fix-pivot-drag-and-drop-adrm
Open

[FIX] pivot: prevent drag & drop in pivot side panel#8842
hokolomopo wants to merge 1 commit into
saas-19.2from
saas-19.2-fix-pivot-drag-and-drop-adrm

Conversation

@hokolomopo
Copy link
Copy Markdown
Contributor

Description

In the pivot side panel, a pointerdown event on a button/input/select of an dimension should not trigger the drag & drop of the dimension.

The way we were handling that was all over the place. Some elements in the children had a pointerdown.stop, the <select> were handled directly before starting a drag & drop, and some elements didn't prevent a d&d where they should have.

We will now handle everything in the layout configurator. Before starting the d&d, we check that the event target is not an input/select, or has a class that indicates that it is interactive and should not trigger a d&d.

The solution is not the greatest, as we might forget some classes, but it beats having the children having to stop pointer events because of their parents.

Task: 6268403

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

In the pivot side panel, a pointerdown event on a button/input/select
of an dimension should not trigger the drag & drop of the dimension.

The way we were handling that was all over the place. Some elements in
the children had a `pointerdown.stop`, the `<select>` were handled
directly before starting a drag & drop, and some elements didn't
prevent a d&d where they should have.

We will now handle everything in the layout configurator. Before starting
the d&d, we check that the event target is not an input/select, or has
a class that indicates that it is interactive and should not trigger
a d&d.

The solution is not the greatest, as we might forget some classes, but
it beats having the children having to stop pointer events because of
their parents.

Task: 6268403
@robodoo
Copy link
Copy Markdown
Collaborator

robodoo commented Jun 3, 2026

Pull request status dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants