fix dynamically created popovers
parent
895b3a5b7b
commit
3c61799977
|
@ -137,6 +137,12 @@ function register_new_elements(e) {
|
|||
for (const element of onchange) {
|
||||
element.onchange = ()=>{execute(element, 'onchange')};
|
||||
}
|
||||
|
||||
for (const element of document.getElementsByClassName('user-name')) {
|
||||
element.onclick = (e) => {
|
||||
popclick(e);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
register_new_elements(document);
|
||||
|
|
|
@ -65,12 +65,6 @@ function popclick(e) {
|
|||
}, 5);
|
||||
}
|
||||
|
||||
for (const element of document.getElementsByClassName('user-name')) {
|
||||
element.onclick = (e) => {
|
||||
popclick(e);
|
||||
};
|
||||
}
|
||||
|
||||
document.addEventListener("click", function(){
|
||||
active = document.activeElement.getAttributeNode("class");
|
||||
if (active && active.nodeValue == "user-name text-decoration-none"){
|
||||
|
|
Loading…
Reference in New Issue