Refactor ui state
Now with more mode!
This commit is contained in:
parent
4710f19b1e
commit
2f9b1925dc
3 changed files with 119 additions and 85 deletions
|
|
@ -9,9 +9,9 @@ const ui = useUiStore();
|
|||
window.addEventListener("keypress", (ev) => {
|
||||
if (document.activeElement !== document.body) return;
|
||||
|
||||
if (ev.key === "Escape") {
|
||||
if (ev.key === "Escape" && ui.mode === "focus") {
|
||||
const parent = ui.focusPath.parent();
|
||||
if (parent) ui.focusPath = parent;
|
||||
if (parent) ui.focusOn(parent);
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue