-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
5.0 regressions, 5.0
-
MOODLE_500_STABLE
-
MDL-85260-500
-
-
-
-
2
-
WP Sprint 2025-I2.0, WP Sprint 2025-I2.1 (Clones), WP Sprint 2025-I2.2 (Clones)
After updating to Bootstrap 5 (Moodle v5), opening a modal no longer prevents the background content from scrolling. The expected behavior is for modals to disable scrolling on the underlying page content.
Please check the attached video example
Technical details
In previous versions the way bootstrap modal was working is by adding the class modal-open to the body but this mechanism has changed since bootstrap 5 (bootstrap commit), now the styles has been removed from the CSS and the way it seems to work is by adding the styles directly to the body through JavaScript, example:
<body class="modal-open" style="overflow: hidden; padding-right: 15px;"> |
Maybe we can change our code to mimic that behaviour and add the styles directly into the body
- is a regression caused by
-
MDL-75669 Upgrade the Boost theme with Bootstrap 5.x
-
- Closed
-