mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 14:11:02 +01:00
Fix close tab buttons not working in old firefox.
This commit is contained in:
parent
e34d521dcc
commit
84cc3d16ed
@ -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));
|
||||
}
|
||||
|
@ -162,7 +162,6 @@ class Manager {
|
||||
document.getElementById("btn-next-input-tab").addEventListener("click", this.input.changeTabRight.bind(this.input));
|
||||
document.getElementById("btn-go-to-input-tab").addEventListener("click", this.input.goToTab.bind(this.input));
|
||||
document.getElementById("btn-find-input-tab").addEventListener("click", this.input.findTab.bind(this.input));
|
||||
this.addDynamicListener("#input-tabs li .btn-close-tab i", "click", this.input.removeTabClick, this.input);
|
||||
this.addDynamicListener("#input-tabs li .input-tab-content", "click", this.input.changeTabClick, this.input);
|
||||
document.getElementById("input-show-pending").addEventListener("change", this.input.filterTabSearch.bind(this.input));
|
||||
document.getElementById("input-show-loading").addEventListener("change", this.input.filterTabSearch.bind(this.input));
|
||||
|
Loading…
Reference in New Issue
Block a user