Skip to content
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

selectpicker('mobile') not working on iOS #1828

Closed
sam-thecoder opened this issue Oct 8, 2017 · 31 comments
Closed

selectpicker('mobile') not working on iOS #1828

sam-thecoder opened this issue Oct 8, 2017 · 31 comments
Labels

Comments

@sam-thecoder
Copy link

I have an issue using the select picker on mobile, I've been able to catch this issue using chrome's mobile device emulator: https://youtu.be/vNzfvwzgPSM it will show it works okay on desktop view but on mobile view you click it multiple times with it not responding accurately.

@sinneren
Copy link

sinneren commented May 7, 2018

Confirm it on iOS 11+ and Chrome Dev Tools with Mobile Touch. But on Android and old iOS work well.

@chrisw73
Copy link

chrisw73 commented Jun 2, 2018

Confirm on iPad Air, iPad Pro and iPhone 7 all with iOS 11.3 and 11.4 and Safari. A native Fallback would be nice...
[Update] Seemt to occur with BS 4 only...

@sanfeijoo
Copy link

I'm using bootstrap 3.3.7 and it doesn't work in mobile when mobile option is set to true

@logicsdrive
Copy link

Any solution so far regarding this issue ?

@caseyjhol
Copy link
Member

No solution yet. I still haven't been able to recreate this issue on my end.

@logicsdrive
Copy link

@caseyjhol here is the demo of that issue, hoping that will help
http://logicsdrive.us/clients/kuwaitnet/oxygen/selectpicker.html
You can check this link on mobile to see the issue.

@Serzhs
Copy link

Serzhs commented Sep 5, 2018

My solution is to downgrade bootstrap select version to v1.12.4

@logicsdrive
Copy link

@Espumisan v1.12.4 works fine with bootstrap 4 ?

@caseyjhol
Copy link
Member

Still checking into this (need to test on iOS). Works on Android 8.0.0 with both Chrome and Firefox.

@logicsdrive
Copy link

Yes there is no issue on Android .. Issue is with IOS

@soberdor
Copy link

soberdor commented Sep 9, 2018

I can confirm this problem on iOS 11.4.2 and Bootstrap 4.1

@jint0136
Copy link

jint0136 commented Sep 11, 2018 via email

@caseyjhol
Copy link
Member

This problem was introduced in commit 7e33113. The native select menu is opened, but then the button is instantly focused, thus closing the menu. On all other devices, operating systems, and browsers, this works fine (as it happens simultaneously), except in Safari on iOS.

@caseyjhol
Copy link
Member

Working on a fix, but this is made more difficult by jquery/jquery#1750 and jquery/jquery#1741 (i.e. it's not possible to namespace focus events in jQuery v1.9+).

caseyjhol added a commit that referenced this issue Sep 15, 2018
…dd focus style to button when select is focused. #1828
@soberdor
Copy link

Hi and thank you for the fix - however, I tested the latest commit and it didn't seem to work. Debugging into the newly introduced "if (!that.options.mobile)" I noticed it was false despite being properly initialized as 'mobile'.

@caseyjhol
Copy link
Member

@soberdor If you use $.fn.selectpicker.Constructor.DEFAULTS.mobile = true; instead of .selectpicker('mobile') does it work?

@soberdor
Copy link

Thanks, yes that works! But is there still any way to use live search on mobile devices? data-live-search="true" doesn't seem to have any effect now.

@caseyjhol
Copy link
Member

@soberdor The "mobile" option (which should probably be renamed) simply uses the device's native select menu, so until something like live search is supported on devices, it won't be possible using that feature. However, I do have plans to implement a more mobile-friendly version of the menu in a future update.

@caseyjhol
Copy link
Member

Released in v1.13.3!

@fatheaddrummer
Copy link

Hi and thanks a lot for everything as well! I just wanted to inform you that I still couldn't get the mobile version running on iPhone 5 SE. I used Bootstrap 4.0.0 and Bootstrap-select 1.13.5. I could work around it however with $.fn.selectpicker.Constructor.DEFAULTS.mobile = true;

Thanks a lot!

@kveldscholten
Copy link

I have test Bootstrap-select 1.13.5 on iPhone 5 and iPhone 7 with Bootstrap 3.3.7 but couldn't work for me.

My Code to check Mobile

if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {
    $('#salutation').selectpicker('mobile');
} else {
    $('#salutation').selectpicker();
}

thanks for help

@toix

This comment has been minimized.

@torrobinson
Copy link

I'm still getting this for Safari on iOS, but not on anything Android/Desktop. Has there ever been a fix for this? The $.fn.selectpicker.Constructor.DEFAULTS.mobile = true; workaround has not worked for me yet, unfortunately.

@kfe908
Copy link

kfe908 commented Jan 6, 2020

Does not work when using Android and Firefox, even downgrading does not work :( The problem exists for years and no solution...that's bad!

@qxygene
Copy link

qxygene commented Apr 25, 2020

any fix on this yet?

@caseyjhol caseyjhol reopened this Apr 25, 2020
@caseyjhol
Copy link
Member

caseyjhol commented Apr 27, 2020

This is working for me with Firefox 68.7.0 on Android, as well as Chrome 81 on Android. Can anybody confirm which browsers/operating systems this happens with? Is it only iOS?

@qxygene
Copy link

qxygene commented Apr 27, 2020

Not working on any safari browser. Tested with browserstack !

@caseyjhol
Copy link
Member

Was able to get my hands on an iOS device and was able to recreate this issue (native select list opens up and immediately closes).

@qxygene
Copy link

qxygene commented Apr 28, 2020

Best way is for now is to detect mobile and destroy bootstap-seelct i guess !

@chrisw73
Copy link

Best way is for now is to detect mobile and destroy bootstap-seelct i guess !

This is, what I'd preffer, because mobile devices usually handle this their way best...

@caseyjhol caseyjhol changed the title Select not working on mobile selectpicker('mobile') not working on iOS May 7, 2020
@caseyjhol
Copy link
Member

Released in v1.13.17!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests