annotation: fix layouting problem on selected comments

modify and reply causes relayouting due to expansion of the
commentsections but it is based on whether they are selected or not
currently. If they are already selected we dont relayout them again
and it causes overlapping. To avoid that we can simply unselect
comments just before reply or modify.

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ifc2e546504b36b46f98a9b22ce791b4279239457
This commit is contained in:
Mert Tumer 2022-03-24 11:09:53 +03:00 committed by pedropintosilva
parent 98f9e65948
commit ab0ed2d6f5

View file

@ -576,6 +576,7 @@ class CommentSection {
}
}
else {
this.unselect();
annotation.reply();
this.select(annotation);
annotation.focus();
@ -591,6 +592,7 @@ class CommentSection {
this.save(annotation);
}.bind(this), /* isMod */ true);
} else {
this.unselect();
annotation.edit();
this.select(annotation);
annotation.focus();