I'm using iScroll4 plugin (http://cubiq.org/iscroll-4/) to add scrollbar to pages that are longer than 80% of height of the browser's viewport. For some reason when (and only in this case) I add it and try to click on input, it won't select. Only clicking on its label will select input.
What can I do to have iScroll4 and selectable input?
Try this solution
myScroll = new iScroll('wrapper', {});
myScroll.options.onBeforeScrollStart = function(e) {
var target = e.target;
while (target.nodeType != 1) target = target.parentNode;
if (target.tagName != 'SELECT' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA'){
e.preventDefault();
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With