mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-13 00:54:04 +02:00
Scrollbar: respect the initial body overflow value (#33706)
* add method to handle overflow on body element & tests * replace duplicated code on modal/offcanvas tests
This commit is contained in:
@@ -39,3 +39,12 @@ export const jQueryMock = {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export const clearBodyAndDocument = () => {
|
||||
const attributes = ['data-bs-padding-right', 'style']
|
||||
|
||||
attributes.forEach(attr => {
|
||||
document.documentElement.removeAttribute(attr)
|
||||
document.body.removeAttribute(attr)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user