X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a6633642232efd164d4708967ab59e498fbff896..refs/pull/3245/head:/resources/js/components/user-select.js diff --git a/resources/js/components/user-select.js b/resources/js/components/user-select.js index 477c11d6b..aba43e0a9 100644 --- a/resources/js/components/user-select.js +++ b/resources/js/components/user-select.js @@ -3,7 +3,6 @@ import {onChildEvent} from "../services/dom"; class UserSelect { setup() { - this.input = this.$refs.input; this.userInfoContainer = this.$refs.userInfo; @@ -13,9 +12,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(); }