-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropdown closing on mousedown instead of mouseup #21941
Comments
can't reproduce this (in Windows anyway). dropdowns on http://v4-alpha.getbootstrap.com/components/dropdowns/ all open on mouseup, not mousedown |
Oh ok, my mistake, I'm going to edit the issue, the problem is the dropdown is closing on mousedown. |
again, can't reproduce the issue on closing either (assuming you mean clicking the button with the down-triangle icon again to close the dropdown) |
In this screencast you can see how the dropdown closes on mousedown instead of mouseup That was recorded using: http://v4-alpha.getbootstrap.com/components/dropdowns/ |
Thanks, that clarifies the problem more. Confirmed |
This is a regression due to #21375.
This is what give the impression that the menu is closed on mousedown. In order to fix this issue and the one solved in #21375 I updated my PR #21535 (as I need improvement from this PR for a proper fix). With #21535, the menu is not closed on Once #21535 is merge the problem will be fixed. |
* dropdown-keyboard: Fixes twbs#21941 # Conflicts: # js/src/dropdown.js
I noticed a related issue when using a dropdown with checkbox inputs inside of a modal. Perhaps this PR will also address this issue as I understand the "focusin" event is no longer used for toggling, so I think that labels which switch the focus will no longer close the dropdown?? Not sure. See here: |
@719media, it seems there is two issues mentioned in your JSFiddle: 1/ When clicking on a
|
Any idea when this will be merged? Is there a way to use a hack or something for a temporary solution? |
I discovered this 2 dropdown issue yesterday and tested that it works as expected in BS3 but not in BS4 v4.0.0-Alpha.6 and since i didn't find any matches on Google incl. this github issue i made a note of it on StackOverflow: http://stackoverflow.com/questions/42680429/boostrap4-issue-with-two-dropdown-in-burgermenu |
@kerolol, a bit nasty (and late) but... maybe handling |
I just ran into this issue today after starting refactor to b4v6 a few days ago, having the exact same behavior as @miguelmich and @kimemax. Has a solution been merged yet? Didn't see anything relevant in @vanduynslagerp's diffs. It seems that clicking the next neighbor of an open dropdown closes the dropdown entirely, but clicking a previous neighbor has intended behavior. I have tried EVERYTHING, wondering if maybe my fumbling can inspire a hack. Using jquery, first tried to Anyone have any idea as to a better logic than my bad attempts? It feels like it should be easy, but it hasn't been. |
So, super hacky with some cheesy jquery animation, but this logic works for me:
Credit due to this great jsfiddle! Curious to know what a bootstrappy solution would be, but this works for now. |
I noticed in the last release (v4.0.0-alpha.6) a new dropdown behavior was introduced, my question is: is this new behavior intentional? because the new interaction seems to be a little odd compared with the old one (closing dropdowns on mouseup).
Testing on Google Chrome Version 55.0.2883.87 (64-bit), Linux Ubuntu Gnome
Thanks in advance
The text was updated successfully, but these errors were encountered: