Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/LeftSidebar/LeftSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<SearchBox ref="searchBox"
:value.sync="searchText"
:is-focused.sync="isFocused"
:list="list"
:list-ref="scroller"
@input="debounceFetchSearchResults"
@abort-search="abortSearch" />
</div>
Expand Down Expand Up @@ -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()
Expand All @@ -414,7 +414,7 @@ export default {
resetNavigation,
leftSidebar,
searchBox,
list,
scroller,
federationStore,
talkHashStore,
isMobile,
Expand Down
8 changes: 5 additions & 3 deletions src/components/UIShared/SearchBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export default {
/**
* Conversations list reference for handling click trigger
*/
list: {
type: HTMLElement,
listRef: {
type: Object,
default: null,
},
},
Expand Down Expand Up @@ -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) {
Expand Down