Choices
Choices copied to clipboard
Touch scrolling inside dropdown broken on mobile
Describe the bug When touch scrolling inside a dropdown the window gets scrolled instead of the dropdown options.
To Reproduce Steps to reproduce the behavior:
- Go to the Choices demo site on mobile
- Click on the "Fake Tales Of San Francisco" dropdown under "Single select input"
- Try scrolling the options inside the dropdown
- The options will scroll a tiny bit, but then window scrolling seems to take over
Expected behavior The dropdown should scroll, not the window.
Screenshots
Smartphone (please complete the following information):
- Device: iPhone 11 Pro
- OS: iOS 13.5.1
- Browser Safari or Chrome
I can't reproduce this issue with Android 9 and Chrome 83.
I have also run into this issue with iOS Safari
I have also this problem with iOS. Interesting thing is, that when you select a value from the list once, it starts to work as it should. So it doesn't work only on the initial load of the page
This is how I fixed it:
choices.passedElement.element.addEventListener('showDropdown', () => {
$('.choices__list').hide();
setTimeout(() => {
$('.choices__list').show();
}, 1);
}, false);
This is how I fixed it:
choices.passedElement.element.addEventListener('showDropdown', () => { $('.choices__list').hide(); setTimeout(() => { $('.choices__list').show(); }, 1); }, false);
@southofthree For me this just keeps the menu hidden and breaks completely. Did you add something else?
This is how I fixed it:
choices.passedElement.element.addEventListener('showDropdown', () => { $('.choices__list').hide(); setTimeout(() => { $('.choices__list').show(); }, 1); }, false);
@southofthree For me this just keeps the menu hidden and breaks completely. Did you add something else?
@aaronjpitts no, nothing else
I am not able to replicate this anymore as of iOS 14, so it looks like Apple might have fixed something on their end.