DEV: potential flakey specs fixes (#21307)

This commit is contained in:
Joffrey JAFFEUX 2023-04-28 22:06:27 +02:00 committed by GitHub
parent 0dea991156
commit cd24656570
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -452,7 +452,10 @@ export default class ChatLivePane extends Component {
// if the last visible message is not fully visible, we don't want to mark it as read
// attempt to mark previous one as read
if (!this.#isBottomOfMessageVisible(element, this.scrollable)) {
if (
element &&
!this.#isBottomOfMessageVisible(element, this.scrollable)
) {
lastUnreadVisibleMessage = lastUnreadVisibleMessage.previousMessage;
if (

View File

@ -33,6 +33,10 @@ export default class ChatSidePanel extends Component {
@action
didResize(element, size) {
if (this.isDestroying || this.isDestroyed) {
return;
}
const parentWidth = element.parentElement.getBoundingClientRect().width;
const mainPanelWidth = parentWidth - size.width;