fixed classList error
This commit is contained in:
parent
ab816b62ec
commit
80c1c6d3ed
@ -303,13 +303,18 @@ class OperationsWaiter {
|
|||||||
EventHandler(ev){
|
EventHandler(ev){
|
||||||
if(ev.key === "Enter" || ev.key === "Space" || ev.key === " " ){
|
if(ev.key === "Enter" || ev.key === "Space" || ev.key === " " ){
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
const el = ev.target.childNodes[3].classList;
|
for(let i = 0; i < ev.target.childNodes.length; i++){
|
||||||
if(!el.contains("show")){
|
let targetChild = ev.target.childNodes[i].classList;
|
||||||
ev.target.childNodes[3].classList.add("show");
|
if(targetChild !== undefined && targetChild.value.includes("panel-collapse collapse")){
|
||||||
}else if(el.contains("show")){
|
if(!targetChild.contains("show")){
|
||||||
ev.target.childNodes[3].classList.remove("show");
|
targetChild.add("show");
|
||||||
|
}else if(targetChild.contains("show")){
|
||||||
|
targetChild.remove("show");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user