Fix close tab buttons not working in old firefox.

This commit is contained in:
j433866 2019-05-10 16:54:28 +01:00
parent e34d521dcc
commit 84cc3d16ed
2 changed files with 2 additions and 2 deletions

View file

@ -833,6 +833,7 @@ class InputWaiter {
newTabButtonIcon.innerText = "clear";
newTabButton.appendChild(newTabButtonIcon);
newTabButton.addEventListener("click", this.removeTabClick.bind(this));
newTab.appendChild(newTabContent);
newTab.appendChild(newTabButton);
@ -1179,7 +1180,7 @@ class InputWaiter {
if (!mouseEvent.target) {
return;
}
const tabNum = mouseEvent.target.parentElement.parentElement.getAttribute("inputNum");
const tabNum = mouseEvent.target.closest("button").parentElement.getAttribute("inputNum");
if (tabNum) {
this.removeInput(parseInt(tabNum, 10));
}