Skip to content

Commit

Permalink
add activeElement check
Browse files Browse the repository at this point in the history
  • Loading branch information
rooklift committed Mar 12, 2022
1 parent a711aca commit 850acd2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/__start_handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ comment_drawer.textarea.addEventListener("keydown", (event) => {

function insert_into_comments(s) {

if (typeof config.comment_box_height !== "number" || config.comment_box_height <= 0) { // Should be impossible.
if (typeof config.comment_box_height !== "number" || config.comment_box_height <= 0) {
return;
}

if (document.activeElement !== comment_drawer.textarea) {
return;
}

Expand Down

0 comments on commit 850acd2

Please sign in to comment.