select multiple close on ipad
if you open a multiple select on an ipad, you can select multiple options, but it is not possible to close it unless you open another select or set focus on an input field
Hi,
I don't have issue on my iPad, can you itemize your environnement ?
I just went to http://materializecss.com and tried the different selects on ipad. The "normal" ones I can close by tapping on a disabled option, but the multiple select stays open. Also if you just tap outside the selects, the selects stay open.
This is on an ipad retina with ios 9.1
On android, they close if you tap outside the selects.
Yes, I've reproduced this on my iPad, I'm thinking we need to add some event listener for tap or look for some way to support touch device defocuses.
This issue is still happening, it works fine on Android but iOS will not tap off.
The tap out is only reacting to click events which doesn't seem to be fired on iPad/iPhone.
This seems to work if you add a touchstart event handler or "redirect" touchstart to click (that is, fire a click event on touchstart events).
I have the same issue on iOS. Do you have any update about it ?
There's no proper fix but you can add the class 'browser default' to the input to get it working.
This is explained about 1/3 of the way down this page: http://materializecss.com/forms.html
Can anyone check if this issue is still present inv0.99.0?
Yes, this issue is still present in v0.99.0.
Hey guys this code should fix the problem with multiple select and closing it on iOS devices.
$(document).on('touchstart', function (e) {
let target = $(e.target);
if (!target.is("span")) { //checking if you are tapping on items in multiple select or not
$(document).trigger('click'); //if you are tapping outside multiple select close it
$(':focus').blur(); //focus out for multiple select so you can choose another or the same (in case you have more multiple selects on page)
} else {
//nothing or fire another event
};
});
This works for me.
Fixed in v1-dev