Exist popup by clicking outside of it

This commit is contained in:
glax 2023-05-23 16:29:09 +02:00
parent 5c4431778e
commit b0ee888c82
2 changed files with 2 additions and 5 deletions

View File

@ -30,6 +30,8 @@ const addtaskpopup = document.querySelector("addtask-popup");
const closetaskpopup = document.querySelector("#closePopupImg");
settingsCog.addEventListener("click", () => slide());
closetaskpopup.addEventListener("click", () => HideNewTaskWindow())
document.querySelector("addtask-background").addEventListener("click", () => HideNewTaskWindow());
let availableTaskTypes;
GetTaskTypes()
@ -107,8 +109,6 @@ function slide(){
slideIn = !slideIn;
}
function ResetContent(){
tasksContent.replaceChildren();
var add = document.createElement("div");
@ -120,7 +120,6 @@ function ResetContent(){
tasksContent.appendChild(add);
}
closetaskpopup.addEventListener("click", () => HideNewTaskWindow())
function ShowNewTaskWindow(){
addtaskpopup.style.display = "block";
addtaskpopup.animate(fadeIn, fadeInTiming);

View File

@ -206,7 +206,6 @@ publication img {
addtask-popup{
display: none;
opacity: 0;
width: 100%;
height: 100%;
top: 0;
@ -246,7 +245,6 @@ window-titlebar {
top: 0;
border-radius: 5px 5px 0 0;
color: var(--accent-color);
display: flex block;
flex-direction: row;
justify-content: space-between;