@kollegorna/cocoon-vanilla-js
Advanced tools
Comparing version 1.0.4 to 1.0.6
@@ -110,6 +110,6 @@ let cocoon_element_counter = 0; | ||
document.addEventListener('click', (e) => { | ||
if(e.target.matches('.add_fields')) { | ||
if(e.target.closest('.add_fields')) { | ||
e.preventDefault(); | ||
e.stopPropagation(); | ||
addFieldsHandler(e.target); | ||
addFieldsHandler(e.target.closest('.add_fields')); | ||
} | ||
@@ -151,4 +151,4 @@ }); | ||
if( | ||
e.target.matches('.remove_fields.dynamic') || | ||
e.target.matches('.remove_fields.existing') | ||
e.target.closest('.remove_fields.dynamic') || | ||
e.target.closest('.remove_fields.existing') | ||
) { | ||
@@ -155,0 +155,0 @@ e.preventDefault(); |
{ | ||
"name": "@kollegorna/cocoon-vanilla-js", | ||
"version": "1.0.4", | ||
"version": "1.0.6", | ||
"description": "A vanilla JS replacement for (Rails) Cocoon's jQuery script", | ||
"main": "index.js", | ||
"engines": { | ||
"node": "<=9.11.2" | ||
}, | ||
"repository": "git+https://github.com/kollegorna/cocoon-vanilla-js.git", | ||
@@ -10,0 +7,0 @@ "author": "Kollegorna", |
@@ -16,3 +16,3 @@ # cocoon-vanilla-js | ||
```js | ||
import "cocoon-vanilla-js"; | ||
import "@kollegorna/cocoon-vanilla-js"; | ||
``` | ||
@@ -19,0 +19,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
10691