Skip to content

Commit 3e8182a

Browse files
committed
Attach click event to format box
1 parent aa4f8f2 commit 3e8182a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

background.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ function func(rand, opts, op, msg) {
408408
el("div", node, "e").textContent = e
409409
}
410410

411-
to.addEventListener("click", onClick, true)
411+
node.addEventListener("click", onClick, true)
412412
if (first) {
413413
to.replaceChild(box = node, first)
414414
} else {
@@ -552,7 +552,6 @@ function func(rand, opts, op, msg) {
552552
}
553553
}
554554
function formatPlain() {
555-
body.removeEventListener("click", onClick, true)
556555
if (first && first.tagName === "PRE") {
557556
body.innerHTML = ""
558557
body.appendChild(first)

0 commit comments

Comments
 (0)