Added close on background click for dates and export popup
This commit is contained in:
@ -51,10 +51,18 @@ class DatesPopup extends HTMLElement{
|
||||
|
||||
hide(){
|
||||
this.style.visibility = "hidden";
|
||||
window.removeEventListener("click", this.backgroundClickCallback);
|
||||
}
|
||||
|
||||
backgroundClickCallback = ({target}) => {
|
||||
if(target.id == "dates-popup"){
|
||||
this.hide();
|
||||
}
|
||||
}
|
||||
|
||||
show(){
|
||||
this.setMaxInputDate();
|
||||
window.addEventListener("click", this.backgroundClickCallback);
|
||||
this.style.visibility = "visible";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user