Skip to content

Commit

Permalink
Merge pull request #13613 from nextcloud/backport/13611/stable30.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Antreesy authored Oct 23, 2024
2 parents db844cd + 082a70f commit b77e726
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/MessagesList/MessagesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1145,14 +1145,16 @@ export default {
return false // element not found
}
if (element.offsetParent === null) {
if (this.isChatVisible && element.offsetParent === null) {
console.debug('Message to focus is hidden, scrolling to its nearest visible parent', messageId)
element = element.closest('ul[style="display: none;"]').parentElement
}
console.debug('Scrolling to a focused message programmatically')
this.isFocusingMessage = true
// TODO: doesn't work if chat is hidden. Need to store
// delayed 'shouldScroll' and call after chat is visible
element.scrollIntoView({
behavior: smooth ? 'smooth' : 'auto',
block: 'center',
Expand Down

0 comments on commit b77e726

Please sign in to comment.