Skip to content

Commit

Permalink
Fix for clicking on the source of the answered message during search
Browse files Browse the repository at this point in the history
  • Loading branch information
nkonev committed Nov 15, 2023
1 parent a80b7ff commit 0444a61
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/src/MessageList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,13 @@
await this.onSearchStringChanged()
},
async onSearchStringChanged() {
await this.reloadItems();
if (!hasLength(this.highlightMessageId)) { // if is required for case
// user searched for some text ("telegram", or "www")
// then in one of found messages user clicks on the original of the answered (which jumps to th original)
// without this fix because of two events (a. search string changed (see in the search mixin), b. route changed (see here in watch))
// the message list is loaded 2 times and as a result the second load resets both scrolling and highlighting)
await this.reloadItems();
}
},
setHash() {
this.hasInitialHash = hasLength(this.highlightMessageId);
Expand Down

0 comments on commit 0444a61

Please sign in to comment.