Closed krixano closed 6 years ago
Will merge it tomorrow.
In theory, you could swap out the id with a class, as that would make it much more usable. 🔀
I can't use the dropdown-toggle
class because the CSS with the :focus
messes up with the active
class. The active class is removed when clicking on the button (to make the dropdown disapear), but the button is still in focus, so the dropdown doesn't disappear.
So, to make it work, I could do one of the following:
.dropdown-toggle:focus+.menu
part in the CSS$('.dropdown > button.btn')
or something like thatYeah, just use a different class-name ;)
Merged to private_chats-Feature
-branch: https://github.com/AnthyG/ThunderWave/commit/6c1e1faf6296bb259018ef07712339c30459b5e0
Before, you weren't able to click on the already focused menu button to hide the dropdown. Now you can! Note that code organization may not be how you want it.
Tested in Edge, Firefox, and Chrome on laptop. Not tested on mobile. Tried to test in IE 11, but JQuery isn't working for it (got
$ is undefined
error).I did have to remove the
dropdown-toggle
class from the menu button because the:focus
css stuff was messing with the functions I used.