mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 23:06:16 -04:00
navigating through faq with arrow, tab and shift tab implemented
This commit is contained in:
parent
798c06d28a
commit
9e4a53fb17
1 changed files with 7 additions and 4 deletions
|
@ -406,12 +406,15 @@ ${navigator.userAgent}
|
||||||
} else {
|
} else {
|
||||||
prevElement.previousElementSibling.previousElementSibling.focus();
|
prevElement.previousElementSibling.previousElementSibling.focus();
|
||||||
}
|
}
|
||||||
} else if(ev.key === "Tab"){
|
} else if(ev.key === "Tab" && !ev.shiftKey){
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
currentElement.parentElement.parentElement.parentElement.nextElementSibling.firstElementChild.focus();
|
currentElement.parentElement.parentElement.parentElement.nextElementSibling.firstElementChild.focus();
|
||||||
|
|
||||||
}
|
} else if(ev.shiftKey && ev.key === "Tab"){
|
||||||
|
currentElement.parentElement.parentElement.previousElementSibling.firstElementChild.firstElementChild.focus();
|
||||||
|
console.log("shift tab", currentElement.parentElement.parentElement.previousElementSibling.firstElementChild.firstElementChild);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -452,12 +455,12 @@ ${navigator.userAgent}
|
||||||
downPanel.nextElementSibling.firstElementChild.querySelector("[class='btn btn-primary']").focus();
|
downPanel.nextElementSibling.firstElementChild.querySelector("[class='btn btn-primary']").focus();
|
||||||
console.log("Arrowdown focus 2", downPanel.nextElementSibling.firstElementChild.querySelector("[class='btn btn-primary']"));
|
console.log("Arrowdown focus 2", downPanel.nextElementSibling.firstElementChild.querySelector("[class='btn btn-primary']"));
|
||||||
}
|
}
|
||||||
} else if(ev.key === "Tab"){
|
} else if(ev.key === "Tab" && !ev.shiftKey){
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
tab.parentElement.parentElement.parentElement.nextElementSibling.firstElementChild.focus();
|
tab.parentElement.parentElement.parentElement.nextElementSibling.firstElementChild.focus();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue