+ 1

How to fix font awesome inside button??

https://code.sololearn.com/WYYi1nRNVL8s/?ref=app I want to make it unclickable because when you click the buttons it doesn't work well when you accidentally click them.

31st Aug 2023, 8:30 AM
Indiphile Menziwa
Indiphile Menziwa - avatar
4 Antworten
+ 1
As always there is more then one solution. You can take mine or find yours,whatever man. I am just trying to help someone to figure it out for yourself,in this case you. And its not ID dilema,it is executing order,which can be solved in a few ways.
31st Aug 2023, 12:57 PM
Samir Krasnic
Samir Krasnic - avatar
+ 1
True, Thanks. I ended up using this solution: *Line 21* if(userId == ""){ userId = e.target.parentElement.id } Works perfect, removing eventListener had problems...
31st Aug 2023, 2:01 PM
Indiphile Menziwa
Indiphile Menziwa - avatar
0
add class to each of your fontawesome buttons. And then disable pointer events. Google and try to solve it.If you cant, reply. P.S for someone who made this kinda complicated code it is piece of cake.
31st Aug 2023, 12:28 PM
Samir Krasnic
Samir Krasnic - avatar
0
I get dumbfounded sometimes Samir Krasnic, and honestly, I don't need to add a new class to do what you're suggesting but I don't think I'll try it. Honestly speaking I just wanted a solution that I saw from the Dev ed YouTube channel which I found very cool, I just thought maybe someone would bless me with that solution when answering here but looking at things chances of that are too low. Plus I know the reason why the bug exists it's due to an ID dilemma, I just wanted to see if everyone's solution would be any interesting to mine...
31st Aug 2023, 12:48 PM
Indiphile Menziwa
Indiphile Menziwa - avatar