diff options
author | Pranam Lashkari <lpranam@collabora.com> | 2024-04-24 21:04:19 +0100 |
---|---|---|
committer | Pranam Lashkari <plashkari628@gmail.com> | 2024-04-25 20:27:25 +0100 |
commit | 1a287fd96d9435af91e15120f56d4965b6b884e3 (patch) | |
tree | a6b20c3cc699a02e68ddcdb7ef7473804dcf9d61 | |
parent | annotation: fixed comments could not expand (diff) | |
download | online-1a287fd96d9435af91e15120f56d4965b6b884e3.tar.gz online-1a287fd96d9435af91e15120f56d4965b6b884e3.zip |
annotation: avoid resizing editing comment
problem:
when you try to reply to long comment, it would be resized
and subsequntly reply box will take space and other comments
will not make enough space for it
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I4d81904721e5bb196947598d0dca211ee9d480a6
-rw-r--r-- | browser/src/layer/tile/CommentListSection.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/browser/src/layer/tile/CommentListSection.ts b/browser/src/layer/tile/CommentListSection.ts index 8437378448..5f6d6d3152 100644 --- a/browser/src/layer/tile/CommentListSection.ts +++ b/browser/src/layer/tile/CommentListSection.ts @@ -1885,7 +1885,8 @@ export class CommentSection extends CanvasSectionObject { const maxMaxHeight = Number(getComputedStyle(document.documentElement).getPropertyValue('--annotation-max-size')); for (var i = 0; i < this.sectionProperties.commentList.length;i++) { // Only if ContentNode is displayed. - if (this.sectionProperties.commentList[i].sectionProperties.contentNode.style.display !== 'none') { + if (this.sectionProperties.commentList[i].sectionProperties.contentNode.style.display !== 'none' + && !this.sectionProperties.commentList[i].isEdit()) { // act commentText height var actHeight = this.sectionProperties.commentList[i].sectionProperties.contentText.getBoundingClientRect().height; // if the comment is taller then minimal, we may want to make it taller |