Skip to content

Commit

Permalink
highlights fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Commanderk3 committed Jan 6, 2025
1 parent b020cb8 commit ff39760
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions js/widgets/phrasemaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,13 @@ class PhraseMaker {
lyricsInput.style.backgroundColor = "#FF6EA1";

inputCell.appendChild(lyricsInput);
inputCell.addEventListener("mouseover", (event) => {
event.target.style.backgroundColor = platformColor.selectorSelected;
});

inputCell.addEventListener("mouseout", (event) => {
event.target.style.backgroundColor = "#FF6EA1";
});
lyricsInput.addEventListener("focus", () => this.activity.isInputON = true);
lyricsInput.addEventListener("blur", () => this.activity.isInputON = false);
lyricsInput.addEventListener("input", (event) => {
Expand Down Expand Up @@ -3112,17 +3119,17 @@ class PhraseMaker {
// Using the alt attribute to store the note value
cell.setAttribute("alt", 1 / noteValue);

cell.onmouseover = (event) => {
cell.addEventListener("mouseover", (event) => {
if (event.target.style.backgroundColor !== "black") {
event.target.style.backgroundColor = platformColor.selectorSelected;
}
};
});

cell.onmouseout = (event) => {
cell.addEventListener("mouseout", (event) => {
if (event.target.style.backgroundColor !== "black") {
event.target.style.backgroundColor = event.target.getAttribute("cellColor");
}
};
});
}

// Add a note value.
Expand Down

0 comments on commit ff39760

Please sign in to comment.