Skip to content

Commit

Permalink
Merge pull request #13614 from nextcloud/backport/13611/stable30
Browse files Browse the repository at this point in the history
  • Loading branch information
Antreesy authored Oct 23, 2024
2 parents d474d44 + c337722 commit 502d12c
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 502d12c

Please sign in to comment.