]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/user-select.js
Added front-end toggle and testing of inline attachments
[bookstack] / resources / js / components / user-select.js
index 477c11d6b5d0e3184fad6ed5144fbb472bc9482e..c2c1f97c3aee5911fdb8c80ce4d63c5609370139 100644 (file)
@@ -13,9 +13,11 @@ class UserSelect {
     }
 
     selectUser(event, userEl) {
+        event.preventDefault();
         const id = userEl.getAttribute('data-id');
         this.input.value = id;
         this.userInfoContainer.innerHTML = userEl.innerHTML;
+        this.input.dispatchEvent(new Event('change', {bubbles: true}));
         this.hide();
     }