mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-15 10:05:40 +02:00
Revert backdrop utilization, handling clicks over modal (#36324)
* refactor(Modal.js): stop using backdrop class to handle clicks over modal * Revert #35554 and backdrop callback usage Explanation: In order to bypass `.modal`, was applied a css rule `pointer-events:none` which caused the side effect, and user couldn't scroll "long content modals" * Update .bundlewatch.config.json Co-authored-by: Mark Otto <markd.otto@gmail.com>
This commit is contained in:
@@ -642,11 +642,8 @@ describe('Modal', () => {
|
||||
modalEl.addEventListener('shown.bs.modal', () => {
|
||||
const spy = spyOn(modal, '_queueCallback').and.callThrough()
|
||||
|
||||
const mouseOverEvent = createEvent('mousedown')
|
||||
const backdrop = document.querySelector('.modal-backdrop')
|
||||
|
||||
backdrop.dispatchEvent(mouseOverEvent)
|
||||
backdrop.dispatchEvent(mouseOverEvent)
|
||||
modalEl.click()
|
||||
modalEl.click()
|
||||
|
||||
setTimeout(() => {
|
||||
expect(spy).toHaveBeenCalledTimes(1)
|
||||
@@ -714,8 +711,7 @@ describe('Modal', () => {
|
||||
const modalEl = fixtureEl.querySelector('.modal')
|
||||
const modal = new Modal(modalEl)
|
||||
modalEl.addEventListener('shown.bs.modal', () => {
|
||||
const mouseOverEvent = createEvent('mousedown')
|
||||
document.querySelector('.modal-backdrop').dispatchEvent(mouseOverEvent)
|
||||
modalEl.click()
|
||||
})
|
||||
|
||||
modalEl.addEventListener('hidden.bs.modal', () => {
|
||||
|
Reference in New Issue
Block a user