Skip to content

Commit

Permalink
Merge pull request #337 from fzero17/main
Browse files Browse the repository at this point in the history
fix: delete comments element when displayCommentAsIcon=true
  • Loading branch information
SamTV12345 authored Sep 9, 2024
2 parents c46df94 + 15a3f7f commit ee5b21f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,12 @@ EpComments.prototype.getCommentData = function () {

// Delete a pad comment
EpComments.prototype.deleteComment = function (commentId) {
$('iframe[name="ace_outer"]').contents().find(`#${commentId}`).remove();
while($('iframe[name="ace_outer"]').contents().find(`#${commentId}`).length > 0){
$('iframe[name="ace_outer"]').contents().find(`#${commentId}`).remove();
}
while($('iframe[name="ace_outer"]').contents().find(`#icon-${commentId}`).length > 0){
$('iframe[name="ace_outer"]').contents().find(`#icon-${commentId}`).remove();
}
};

const cloneLine = (line) => {
Expand Down

0 comments on commit ee5b21f

Please sign in to comment.