-
-
Notifications
You must be signed in to change notification settings - Fork 78.5k
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
Modal, Dropdown does not work properly on mobile devices #5094
Comments
Same problem on iOS's Safari browser on iPhone and iPad. Dropdown menu opens fine but cannot be tapped on. |
I am facing this problem with their recent release 2.1.1 too |
but what about 2.1.2 ? |
Easily fixed by adding:
This fix is incorporated into #5067 - basically stops the touch event on a dropdown from bubbling to the next element, which would be the HTML tag and has the clearMenus function. |
Could also do a check inside the function clearMenus(e) {
if (e && typof e === 'object' && e.type === 'touchstart') {
if ($(this).closest('.dropdown-menu').length) { return; }
}
...
} However, this would be more expensive and only result in the advantage of being able to bind dropdown menu touch events to the html tag. P.S. This code snippet is untested but should work fine. |
The suggest of @blakeembrey solve my problem about Dropdown... Thanks |
Thanks @blakeembrey my dropdown menu items are clickable on the iphone now |
Closing this as a dupe of #5094, which also reports the same dropdown issues. Hoping to have a fix in 2.2.2-wip. |
@blakeembrey, thanks for the fix. Sorry for the newbie question, but where do you add it? |
@pseps Both the snippets I posted modify the |
@blakeembrey Thanks! |
1 similar comment
@blakeembrey Thanks! |
@blakeembrey Yo!!! You are my friend saving me a day of life! |
Am I being dense or was this bug closed as a duplicate of itself? Was it a typo and there's another bug out there that I should be following for a fix to this? |
Sorry how exactly do I incorporate blakeembrey's fix? I'm a numbskull. |
Modal and Dropdown opens up without any error but the elements inside it are not actionable on mobile devices. I mean in case of Dropdown clicking on options, Dropdown disappears but the action is not getting performed. And in case of Modal its not allowing me to click on the elements inside it. Basically Dropdown and Modal both are completely unusable on mobile device (on web it works well). Even Modal and Dropdown inside Bootstrap main site also does not work for me. I am testing on default browser for android
The text was updated successfully, but these errors were encountered: