Closed qianshancun closed 3 years ago
@qianshancun Are you talking about #top-chrome-touch-ui
in chrome://flags/ ? If so, I cannot reproduce.
If you're talking about changing the "Device" in the web inspector, this behavior is expected if you're changing to a device with a mobile Android
user-agent. See the third question in the FAQ. Chosen is disabled for any user-agent that includes both Android
and Mobile
.
@qianshancun Are you talking about
#top-chrome-touch-ui
in chrome://flags/ ? If so, I cannot reproduce.If you're talking about changing the "Device" in the web inspector, this behavior is expected if you're changing to a device with a mobile
Android
user-agent. See the third question in the FAQ. Chosen is disabled for any user-agent that includes bothAndroid
andMobile
.
@tjschuck You can do this to reproduce it:
@qianshancun Okay, that's the second thing I mentioned. I can reproduce when I do what's shown in your screenshot, but using those settings, my request has the User Agent Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Mobile Safari/537.36
— that User Agent matches on the Android
+ Mobile
check, so Chosen is intentionally disabled.
See https://github.com/harvesthq/chosen/pull/1388 for more info about why Chosen is disabled in touch environments.
Hi, thanks very much for the information. Is there any way I could keep it enabled? Like passing in an option like this:
$el.chosen({bypass_mobile_disable:true});
There's no existing option like that, no. Your best bet would just be to locally modify the browser_is_supported
check to do what you'd like.
Fails to load when Chrome is set to touch mode:
This issue happens on the official page: https://harvesthq.github.io/chosen/
Screenshot: