The keyboard does not disappear when using iScroll

We use iscroll4 for the Android application. If iScroll is not used when I touch the input field, the keyboard opens automatically and it disappears when I touch the place outside the input field. If iScroll is used, this does not happen. When I touch outside iScroll, the div panel closes automatically. How to avoid this problem? I would like the keyboard to work fine when using iScroll.

+4
source share
1 answer

I believe scroll triggered, not focus , and you just need to prevent this from form elements.

 myScroll = new iScroll('scroller-parent', { // All our params are set // Allow form elements to be clickable/selected 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(); } }); 
0
source

Source: https://habr.com/ru/post/1437790/


All Articles