mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
formatting
This commit is contained in:
parent
a3c47299f9
commit
f75d07bfc7
1 changed files with 10 additions and 10 deletions
|
@ -83,24 +83,24 @@ class StatusBarPanel {
|
||||||
* @param {Event} e
|
* @param {Event} e
|
||||||
*/
|
*/
|
||||||
showDropUp(e) {
|
showDropUp(e) {
|
||||||
if (e.type === "click" || e.key === 'Enter'|| e.key === ' ') {
|
if (e.type === "click" || e.key === "Enter"|| e.key === " ") {
|
||||||
const el = e.target
|
const el = e.target
|
||||||
.closest(".cm-status-bar-select")
|
.closest(".cm-status-bar-select")
|
||||||
.querySelector(".cm-status-bar-select-content");
|
.querySelector(".cm-status-bar-select-content");
|
||||||
const btn = e.target.closest(".cm-status-bar-select-btn");
|
const btn = e.target.closest(".cm-status-bar-select-btn");
|
||||||
|
|
||||||
if (btn.classList.contains("disabled")) return;
|
if (btn.classList.contains("disabled")) return;
|
||||||
|
|
||||||
el.classList.add("show");
|
el.classList.add("show");
|
||||||
|
|
||||||
// Focus the filter input if present
|
// Focus the filter input if present
|
||||||
const filter = el.querySelector(".cm-status-bar-filter-input");
|
const filter = el.querySelector(".cm-status-bar-filter-input");
|
||||||
if (filter) filter.focus();
|
if (filter) filter.focus();
|
||||||
|
|
||||||
// Set up a listener to close the menu if the user clicks outside of it
|
// Set up a listener to close the menu if the user clicks outside of it
|
||||||
hideOnClickOutside(el, e);
|
hideOnClickOutside(el, e);
|
||||||
// Set up a listener to close the menu if the user presses key outside of it
|
// Set up a listener to close the menu if the user presses key outside of it
|
||||||
hideOnMoveFocus(el, e);
|
hideOnMoveFocus(el, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue