fixed query to avoid hierarchy clashes

This commit is contained in:
dcore94 2023-10-27 15:53:32 +02:00
parent 4818464409
commit 801e349e80
1 changed files with 3 additions and 3 deletions

View File

@ -549,11 +549,11 @@ class CCPRemoteFileInputWidgetController extends CCPBaseInputWidgetController{
`
const ws = this.rootdoc.querySelector("div[name=ws]")
this.rootdoc.querySelector("svg[name=trigger]").addEventListener("click", ev=>{
ws.parentElement.classList.toggle("d-none")
ws.classList.toggle("d-none")
})
this.rootdoc.querySelector("span[name=closebtn]").addEventListener("click", ev=>{
ws.parentElement.classList.add("d-none")
ws.classList.add("d-none")
})
this.addEventListener("dragover", ev=>{
@ -570,7 +570,7 @@ class CCPRemoteFileInputWidgetController extends CCPBaseInputWidgetController{
})
document.addEventListener("keydown", ev=>{
if(ev.code == 'Escape' ) ws.parentElement.classList.add("d-none");
if(ev.code == 'Escape' ) ws.classList.add("d-none");
})
}