mirror of
https://github.com/gchq/CyberChef
synced 2024-11-16 09:27:56 +00:00
Change srcElement to target
(srcElement is non-standard)
This commit is contained in:
parent
de21f14fd8
commit
8739dd97d6
2 changed files with 9 additions and 9 deletions
|
@ -533,9 +533,9 @@ class InputWaiter {
|
|||
inputOpen(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (e.srcElement.files.length > 0) {
|
||||
this.loadUIFiles(e.srcElement.files);
|
||||
e.srcElement.value = "";
|
||||
if (e.target.files.length > 0) {
|
||||
this.loadUIFiles(e.target.files);
|
||||
e.target.value = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -880,10 +880,10 @@ class InputWaiter {
|
|||
* @param {event} mouseEvent
|
||||
*/
|
||||
removeTabClick(mouseEvent) {
|
||||
if (!mouseEvent.srcElement) {
|
||||
if (!mouseEvent.target) {
|
||||
return;
|
||||
}
|
||||
const tabNum = mouseEvent.srcElement.parentElement.parentElement.getAttribute("inputNum");
|
||||
const tabNum = mouseEvent.target.parentElement.parentElement.getAttribute("inputNum");
|
||||
if (tabNum) {
|
||||
this.removeTab(parseInt(tabNum, 10));
|
||||
}
|
||||
|
@ -986,10 +986,10 @@ class InputWaiter {
|
|||
* @param {event} mouseEvent
|
||||
*/
|
||||
changeTabClick(mouseEvent) {
|
||||
if (!mouseEvent.srcElement) {
|
||||
if (!mouseEvent.target) {
|
||||
return;
|
||||
}
|
||||
const tabNum = mouseEvent.srcElement.parentElement.getAttribute("inputNum");
|
||||
const tabNum = mouseEvent.target.parentElement.getAttribute("inputNum");
|
||||
if (tabNum) {
|
||||
this.changeTab(parseInt(tabNum, 10), this.app.options.syncTabs);
|
||||
}
|
||||
|
|
|
@ -511,8 +511,8 @@ class OutputWaiter {
|
|||
* @param {event} mouseEvent
|
||||
*/
|
||||
changeTabClick(mouseEvent) {
|
||||
if (!mouseEvent.srcElement) return;
|
||||
const tabNum = mouseEvent.srcElement.parentElement.getAttribute("inputNum");
|
||||
if (!mouseEvent.target) return;
|
||||
const tabNum = mouseEvent.target.parentElement.getAttribute("inputNum");
|
||||
if (tabNum) {
|
||||
this.changeTab(parseInt(tabNum, 10), this.app.options.syncTabs);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue