thycooon
KPCKevin Powell - Community
•Created by thycooon on 2/17/2025 in #front-end
Why does the eventListener just works on the first occasion?
oh ok yeah, I'm on chrome
28 replies
KPCKevin Powell - Community
•Created by thycooon on 2/17/2025 in #front-end
Why does the eventListener just works on the first occasion?
I need to get better at debugging then?! Did you create breakpoints at all?
28 replies
KPCKevin Powell - Community
•Created by thycooon on 2/17/2025 in #front-end
Why does the eventListener just works on the first occasion?
yeah
28 replies
KPCKevin Powell - Community
•Created by thycooon on 2/17/2025 in #front-end
Why does the eventListener just works on the first occasion?
Thanks so much for your help tho. Marking this as solved now.
28 replies
KPCKevin Powell - Community
•Created by thycooon on 2/17/2025 in #front-end
Why does the eventListener just works on the first occasion?
How did you learn about this? Did you face similar problems as me?
28 replies
KPCKevin Powell - Community
•Created by thycooon on 2/17/2025 in #front-end
Why does the eventListener just works on the first occasion?
Why is that so btw? I want to read on it
28 replies
KPCKevin Powell - Community
•Created by thycooon on 2/17/2025 in #front-end
Why does the eventListener just works on the first occasion?
yeah, that was the question, I'll update :)
28 replies
KPCKevin Powell - Community
•Created by thycooon on 2/17/2025 in #front-end
Why does the eventListener just works on the first occasion?
Can I use the
appendChild()
on the popup container and innerHTML the content in? (because of classes and stuff, I don't like the js way of manually setting everything and then appending it, its so many lines of code, compared to innerHTML)28 replies
KPCKevin Powell - Community
•Created by thycooon on 2/17/2025 in #front-end
Why does the eventListener just works on the first occasion?
why is that so and what would be a proper way to do it?
28 replies
KPCKevin Powell - Community
•Created by thycooon on 2/17/2025 in #front-end
Why does the eventListener just works on the first occasion?
I used bubbling and
once: true
for the eventListenener in the popup to be as effiencient as possible (only adding one eventListener for every possibility, that does not need to be garbage collected)
But the once: true
should not be relevant for how many times I can open the modal, if that makes sense.28 replies
KPCKevin Powell - Community
•Created by thycooon on 2/17/2025 in #front-end
Why does the eventListener just works on the first occasion?
The issue is, that it does not open twice.
Everything works on the first click of the page. But you can also notice, that for demonstration purposes I added a "click" to the page, whenever this popup opens... It only seems to listen for it once.
28 replies
KPCKevin Powell - Community
•Created by thycooon on 2/17/2025 in #front-end
Why does the eventListener just works on the first occasion?
yes, if they click abort or the space that is blured.
28 replies