+ 1
[FORCEFULLY SOLVED] The button keeps focused => hovered after pressing it
After the button is pressed, I want it to stay in its original style, but it keeps focused, so I did button.blur() Now, it keeps being hovered, fix it? https://code.sololearn.com/W732w0i25kCF/?ref=app
10 Antworten
+ 5
March Zucherberg
You're calling the function immediately and then calling undefined in a second!
Don't call it immediately, pass in a function.. then it will work
+ 4
March Zucherberg pass this inside of setTimeout:
() => button.blur()
instead of just button.blur()
+ 3
Hi.. Focus cannot be done on an hidden object if I am right. The focus works the same way a user interacts.
Which means, if user cannot focus then the js cannot too
+ 1
how can this be
0
😂😂 I am also his bigger fan😉
0
maf did that, but the button still stays hovered.
Edit: I thought an idea that only one element can be focused at a time and created a hidden button and clicked that button using Javascript. the hidden button is focused and clicked, but still that stupid button shows focused😂
0
Ram
0
Piyush[21 Dec❤️] I don't understand, can you give example.
- 2
March Zucherberg 😑 Why you puted mark zuckerberg name and photo on your profile. I am one of big fan of him