Steps to reproduce the bug: - Drag and drop several snippets onto a web page in edit mode to make the vertical scrollbar appear. - Drag and drop a popup onto the page. - Drag and drop snippets into the popup so that the height of the popup exceeds the height of the viewport. - Try to scroll the popup downwards by clicking and dragging on the scrollbar (not using the mouse wheel). - Bug: the page is scrolled instead of the popup. Note: This bug occurs in Chrome (not in Firefox). This issue occurs because two scrollbars are present at the same location (one for the page and one for the popup) and they overlap each other. Normally, Bootstrap removes the scrollbar from the body when a modal is opened, and this behavior was adapted for the #wrapwrap element with this commit [1]. However, when transitioning to Bootstrap 5, the code that overrides Bootstrap was removed instead of being adapted (this was done in this commit [2]). In later commits [3] and [4], we continued to remove code that updated the scrollbar based on the opening of a modal because this code was causing errors due to the fact that it was incomplete without the part removed by commit [2]. This commit restores the original behavior (before the deletions made by the aforementioned commits) by restoring the missing code and properly adapting it to Bootstrap 5. [1]: https://github.com/odoo/odoo/commit/9cf8b97fe40444b44ebb6e6fb992bc658a087d32 [2]: https://github.com/odoo/odoo/commit/0b94da214b7017e8580e671cbaa68ade6de2fbc7 [3]: https://github.com/odoo/odoo/commit/cb7cf77ed080e86f800af61c9a3dc4ad36ad6cfb [4]: https://github.com/odoo/odoo/commit/51939d09f84579f61f1ff77aacd754beba036dc2 task-3102275 closes odoo/odoo#126709 X-original-commit: 0e75f1c01ca4fcc3eb483a7256bcf72b2bca39c3 Signed-off-by: Benoit Socias (bso) <bso@odoo.com>