Unverified Commit d100b74a authored by Mahe's avatar Mahe Committed by GitHub
Browse files

Improved Esc key behavior on search bar (#351)

Co-authored-by: mahe's avatarMahe <mahe@fsfe.org>
parent 564a1564
......@@ -58,7 +58,16 @@ export async function registerShortcuts() {
if(event.key === "Escape") {
// if search is focused, lose focus on escape
if(document.activeElement.id==="todoTableSearch") todoTableSearch.blur();
if(document.activeElement.id==="todoTableSearch") {
return false;
// if 'add as todo' is focused, return to search
if(document.activeElement.id==="todoTableSearchAddTodo") {
return false;
// if a datepicker container is detected interrupt, datepicker destruction is handled in module
if(document.querySelector(".datepicker")) return false;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment