mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 03:11:19 +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:
@@ -2,7 +2,7 @@ import Offcanvas from '../../src/offcanvas'
|
||||
import EventHandler from '../../src/dom/event-handler'
|
||||
|
||||
/** Test helpers */
|
||||
import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture'
|
||||
import { clearBodyAndDocument, clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture'
|
||||
import { isVisible } from '../../src/util'
|
||||
|
||||
describe('Offcanvas', () => {
|
||||
@@ -15,15 +15,11 @@ describe('Offcanvas', () => {
|
||||
afterEach(() => {
|
||||
clearFixture()
|
||||
document.body.classList.remove('offcanvas-open')
|
||||
document.documentElement.removeAttribute('style')
|
||||
document.body.removeAttribute('style')
|
||||
document.body.removeAttribute('data-bs-padding-right')
|
||||
clearBodyAndDocument()
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
document.documentElement.removeAttribute('style')
|
||||
document.body.removeAttribute('style')
|
||||
document.body.removeAttribute('data-bs-padding-right')
|
||||
clearBodyAndDocument()
|
||||
})
|
||||
|
||||
describe('VERSION', () => {
|
||||
|
Reference in New Issue
Block a user