Skip to content

Commit 3c16d61

Browse files
committed
Look for .ptx-sagecell not .sagecell-sage
sage cells are handled differently insdie knowls and do not have a parent with the class sagecell-sage
1 parent 6b8478f commit 3c16d61

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • bases/rsptx/interactives/runestone/common/js

bases/rsptx/interactives/runestone/common/js/pretext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function setupPTXEvents() {
2727
// log an event when a sage cell is evaluated
2828
document.querySelectorAll(".sagecell_evalButton").forEach((btn) => {
2929
btn.addEventListener("click", function () {
30-
let container = btn.closest(".sagecell-sage");
30+
let container = btn.closest(".ptx-sagecell");
3131
let codeInput = container ? container.querySelector(".sagecell_input") : null;
3232
let code = codeInput ? codeInput.textContent : "";
3333
let div_id = container ? container.id : null;

0 commit comments

Comments
 (0)