diff --git a/src/components/LeftSidebar/LeftSidebar.vue b/src/components/LeftSidebar/LeftSidebar.vue index 433dd802796..6e7aad24077 100644 --- a/src/components/LeftSidebar/LeftSidebar.vue +++ b/src/components/LeftSidebar/LeftSidebar.vue @@ -13,7 +13,7 @@ @@ -402,7 +402,7 @@ export default { setup() { const leftSidebar = ref(null) const searchBox = ref(null) - const list = ref(null) + const scroller = ref(null) const federationStore = useFederationStore() const talkHashStore = useTalkHashStore() @@ -414,7 +414,7 @@ export default { resetNavigation, leftSidebar, searchBox, - list, + scroller, federationStore, talkHashStore, isMobile, diff --git a/src/components/UIShared/SearchBox.vue b/src/components/UIShared/SearchBox.vue index fb357bb2ddf..09f1254b44f 100644 --- a/src/components/UIShared/SearchBox.vue +++ b/src/components/UIShared/SearchBox.vue @@ -58,8 +58,8 @@ export default { /** * Conversations list reference for handling click trigger */ - list: { - type: HTMLElement, + listRef: { + type: Object, default: null, }, }, @@ -143,10 +143,12 @@ export default { }) return } + // Blur triggered by clicking on a conversation item - if (this.list?.contains(event.relatedTarget)) { + if (this.listRef && this.listRef.$el.contains(event.relatedTarget)) { return } + // Blur in other cases this.$emit('blur', event) if (!this.isSearching) {