Skip to content

Commit

Permalink
Fix preview when editing comment twice
Browse files Browse the repository at this point in the history
  • Loading branch information
int-y1 authored and quantum5 committed May 20, 2022
1 parent 42ee283 commit 7fb0d74
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions templates/comments/media-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@
});
});
},
beforeClose: function () {
if ('DjangoPagedown' in window) {
var $wmd = $('.featherlight .wmd-input');
if ($wmd.length) {
window.DjangoPagedown.destroyEditor($wmd.get(0));
}
}
},
variant: 'featherlight-edit'
});

Expand Down

0 comments on commit 7fb0d74

Please sign in to comment.