Skip to content

Commit 4005ad8

Browse files
committed
annotation: avoid autosaving empty comments
problem: comment HTML being undefined caused some conditions to evaluate to true ie: in function onLostFocus this.sectionProperties.contentText.origHTML !== this.sectionProperties.nodeModifyText.innerHTML Signed-off-by: Pranam Lashkari <[email protected]> Change-Id: Ibeaf20618a9f47b4f3833459c120d6e5155f4fa0
1 parent 0826112 commit 4005ad8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

browser/src/canvas/sections/CommentSection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ export class Comment extends CanvasSectionObject {
455455
this.sectionProperties.contentText.innerHTML = this.sanitize(linkedText);
456456
// Original unlinked text
457457
this.sectionProperties.contentText.origText = this.sectionProperties.data.text ? this.sectionProperties.data.text: '';
458-
this.sectionProperties.contentText.origHTML = this.sectionProperties.data.html;
458+
this.sectionProperties.contentText.origHTML = this.sectionProperties.data.html ? this.sectionProperties.data.html: '';
459459
this.sectionProperties.nodeModifyText.innerText = this.sectionProperties.data.text ? this.sectionProperties.data.text: '';
460460
if (this.sectionProperties.data.html) {
461461
this.sectionProperties.nodeModifyText.innerHTML = this.sanitize(this.sectionProperties.data.html);

0 commit comments

Comments
 (0)