[FIX] web: rework draggable_hook scrolling
In Knowledge, the scrollParent for the `Y` axis of an embedded ungrouped Kanban
view is the article body, which contains the draggable `container` (which is
itself contained in the scrollParent for the `X` axis).
This commit introduce 2 fixes related to the `draggable_hook_builder`:
- In `draggable_hook_builder`, `updateRects` was modifying values of the
`containerRect` from values of the `scrollParent`. Then, the `containerRect`
was used in `handleEdgeScrolling` to compute a scroll value to apply on the
`scrollParent`, and when updating the dragged element position, to compute the
boundaries for the dragged element. This commit stores values for
`scrollParent` in `scrollParentRect` alongside the modified `containerRect`.
`scrollParentRect` will be used to compute the scroll value based only on the
dimensions of the scrollParent, and the modified `containerRect` will be used
to compute the boundaries.
- The `scrollParent` in the `X` axis can be different from the `scrollParent` in
the `Y` axis. This commit stores both of them individually so that one is not
neglected when higher in the DOM than the other.
Task-3291771
closes odoo/odoo#121089
Signed-off-by:
Julien Mougenot (jum) <jum@odoo.com>
Loading
Please register or sign in to comment