Background: First Pr #33245 was to just decoupling scrollbar functionality form modal.js , coping the existing code as it was.
This Pr optimizes functionality:
- Removes
.modal-open
class as it is already handled by scrollbar.js - _modal.scss make modal
overflowY: auto
by default (was on ``.modal-open`, which is the same) - scrollbar.js: keep initial body
overflowY
value as attribute and re-set it properly & test - scrollbar.js: avoid to create data-bs attributes for null values
- Revisit modal, offcanvas & scrollbar tests
- set the base to support different rootElement (than body) helping #33018 an #33574