Skip to content

Commit

Permalink
Fix MathLive Ctrl + Enter
Browse files Browse the repository at this point in the history
  • Loading branch information
khui0 committed Mar 26, 2024
1 parent 69b83f7 commit 1d43dd4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/clicker/clicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ mf.addEventListener("input", e => {
e.target.classList.remove("attention");
});

// Prevent MathLive default behavior
mf.addEventListener("keydown", e => {
if (e.ctrlKey && e.key == "Enter") {
e.preventDefault();
}
});

// Reset inputs to default state
function resetInputs() {
const mode = ui.getButtonSelectValue(document.getElementById("answer-mode-selector"));
Expand Down

0 comments on commit 1d43dd4

Please sign in to comment.