]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Event handler: merge `new Event` with `new CustomEvent`
authorGeoSot <geo.sotis@gmail.com>
Thu, 16 Dec 2021 11:24:16 +0000 (13:24 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Sun, 30 Jan 2022 12:15:17 +0000 (14:15 +0200)
js/src/dom/event-handler.js

index f4305b6187c4fef6f872ac84d0f2338b86dedd54..9ab1fe3c55a5a02cc40e4bfc5b1b6bd62bbdf3ef 100644 (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') {