Skip to content

Commit

Permalink
Remove unnecessary data-bs-backdrop="static" (#33578)
Browse files Browse the repository at this point in the history
Since the value for the `backdrop` option is available in the configuration object.
  • Loading branch information
rohit2sharma95 committed Apr 8, 2021
1 parent 0795a77 commit 9bca1b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/tests/unit/modal.spec.js
Expand Up @@ -585,7 +585,7 @@ describe('Modal', () => {
})

it('should not close modal when clicking outside of modal-content if backdrop = static', done => {
fixtureEl.innerHTML = '<div class="modal" data-bs-backdrop="static" ><div class="modal-dialog"></div></div>'
fixtureEl.innerHTML = '<div class="modal"><div class="modal-dialog"></div></div>'

const modalEl = fixtureEl.querySelector('.modal')
const modal = new Modal(modalEl, {
Expand All @@ -612,7 +612,7 @@ describe('Modal', () => {
})

it('should close modal when escape key is pressed with keyboard = true and backdrop is static', done => {
fixtureEl.innerHTML = '<div class="modal" data-bs-backdrop="static"><div class="modal-dialog"></div></div>'
fixtureEl.innerHTML = '<div class="modal"><div class="modal-dialog"></div></div>'

const modalEl = fixtureEl.querySelector('.modal')
const modal = new Modal(modalEl, {
Expand Down Expand Up @@ -669,7 +669,7 @@ describe('Modal', () => {
})

it('should not overflow when clicking outside of modal-content if backdrop = static', done => {
fixtureEl.innerHTML = '<div class="modal" data-bs-backdrop="static"><div class="modal-dialog" style="transition-duration: 20ms;"></div></div>'
fixtureEl.innerHTML = '<div class="modal"><div class="modal-dialog" style="transition-duration: 20ms;"></div></div>'

const modalEl = fixtureEl.querySelector('.modal')
const modal = new Modal(modalEl, {
Expand Down

0 comments on commit 9bca1b5

Please sign in to comment.