Skip to content

Commit

Permalink
fix: codeBlockContentHandler.js: $tryRemoveMe
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaed3mi committed Aug 28, 2023
1 parent 1224859 commit 4ebb241
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/codeBlockContentHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export default class CodeBlockHandler {
}
}
$tryRemoveMe(event, callback) {
if (!'.cherry-previewer-codeBlock-content-handler__input'.contains(event.target)) {
const dom = document.querySelector('.cherry-previewer-codeBlock-content-handler__input');
if (!dom.contains(event.target)) {
this.$remove();
callback();
}
Expand Down

0 comments on commit 4ebb241

Please sign in to comment.