mirror of
https://github.com/manilarome/the-glorious-startpage.git
synced 2024-12-25 07:28:47 +01:00
escape button will close opened screens/panel
This commit is contained in:
parent
df3066687d
commit
eacf044f07
@ -23,13 +23,19 @@ document.addEventListener(
|
|||||||
|
|
||||||
if (event.key === 'Escape') {
|
if (event.key === 'Escape') {
|
||||||
|
|
||||||
// If searchbox is visible, hide and clear input field
|
// If any of this are open, close it
|
||||||
if (searchBoxVisility) {
|
if (searchBoxVisility) {
|
||||||
// Hide searchbox
|
// Hide searchbox
|
||||||
toggleSearchBox();
|
toggleSearchBox();
|
||||||
searchBox.value = '';
|
searchBox.value = '';
|
||||||
return;
|
return;
|
||||||
};
|
} else if (weatherScreenVisibility) {
|
||||||
|
toggleWeatherScreen();
|
||||||
|
return;
|
||||||
|
} else if (rightDashboardVisibility) {
|
||||||
|
toggleDashboard();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Show web menu
|
// Show web menu
|
||||||
toggleWebMenu();
|
toggleWebMenu();
|
||||||
|
Loading…
Reference in New Issue
Block a user