move breakpoint icon functionality into c-recipe-li, upgrade code a bit for className consistency and replacing 'parentNode.parentNode' with this.queryselector

This commit is contained in:
Robin Scholtes 2023-08-15 12:41:33 +12:00
parent 5d876fb09a
commit 4947f809a9
6 changed files with 20 additions and 28 deletions

View file

@ -64,7 +64,7 @@ class BindingsWaiter {
case "KeyB": // Set breakpoint
e.preventDefault();
try {
elem = document.activeElement.closest(".operation").querySelectorAll(".breakpoint")[0];
elem = document.activeElement.closest(".operation").querySelectorAll(".breakpoint-icon")[0];
if (elem.getAttribute("break") === "false") {
elem.setAttribute("break", "true"); // add break point if not already enabled
elem.classList.add("breakpoint-selected");