odoo/odoo#163619

Created by fw-bot
Closed
label
odoo-dev:17.0-15.0-fix-scroll-page-after-scrolling-a-modal-bvr-8Ap0-fw
head
3701fdf15bc532cf7acdd27c2e892c4d12050278
target
17.0
forward-port of
odoo/odoo#162166 DETACHED (Closed by bvr-odoo)

[FW][FIX] web_editor: fix page scroll after scrolling a modal

Steps to reproduce the bug:
- In "Website" edit mode.
- Drag and drop enough snippets onto the page to make the vertical
scrollbar appear.
- Drag and drop the "Popup" snippet onto the page.
- Drag and drop enough snippets into the "Popup" to make the vertical
scrollbar appear.
- Close the popup.
- Drag a snippet from the snippet menu without releasing the mouse.
- Move it to the bottom of the page.
- Bug: the page doesn't scroll.

In the following commit [1], we enabled "smooth scroll on drag" to work
within a modal. The element being scrolled was indeed the modal when
dragging a snippet over it. However, in a later commit [2], the behavior
was changed and caused the bug. After closing the modal, we did not
redefine the scrollable element, so it remained the modal instead of the
page.

[1]: https://github.com/odoo/odoo/commit/40795c00368677b643afb7c0f2ccea7dd2eeb2ee
[2]: https://github.com/odoo/odoo/commit/7ed3f3151a5352958f929ac8a4f10ea181be5ab1

task-3854032

Forward-Port-Of: odoo/odoo#162166