1
0
Caleb Porzio 3 жил өмнө
parent
commit
9e79850a2a

+ 2 - 0
packages/alpinejs/src/utils/on.js

@@ -28,6 +28,8 @@ export default function on (el, event, modifiers, callback) {
         handler = wrapHandler(handler, (next, e) => {
             if (el.contains(e.target)) return
 
+            if (e.target.isConnected === false) return
+
             if (el.offsetWidth < 1 && el.offsetHeight < 1) return
 
             // Additional check for special implementations like x-collapse