1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-24 20:02:53 +01:00

Event handler: merge new Event with new CustomEvent

This commit is contained in:
GeoSot 2021-12-16 13:24:16 +02:00 committed by XhmikosR
parent fa93995123
commit d092817059

View File

@ -283,7 +283,6 @@ const EventHandler = {
const $ = getjQuery()
const typeEvent = getTypeEvent(event)
const inNamespace = event !== typeEvent
const isNative = nativeEvents.has(typeEvent)
let jQueryEvent
let bubbles = true
@ -299,9 +298,7 @@ const EventHandler = {
defaultPrevented = jQueryEvent.isDefaultPrevented()
}
const evt = isNative ?
new Event(event, { bubbles, cancelable: true }) :
new CustomEvent(event, { bubbles, cancelable: true })
const evt = new Event(event, { bubbles, cancelable: true })
// merge custom information in our event
if (typeof args !== 'undefined') {