Recently, I used iscroll to slide the screen up and down on the mobile platform. It is found that when iscroll is used, input and so on cannot be entered. Add the following content to the iscroll. js file:CodeOK.
FunctionAllowformsiniscroll () {[]. Slice. Call (document. queryselectorall ('Input, select, click'). foreach (Function(EL) {El. addeventlistener (('Ontouchstart'InWindow )? 'Touchstart': 'mouseunder ',Function(E) {e. stoppropagation () ;})} document. addeventlistener ('Domainloaded', allowformsiniscroll,False);
The cause is:Iscroll needs to constantly listen to the user's touch operations to make the corresponding effect, so it shields the remaining default events.
the above Code principle is : after the page is loaded, all the 'inputs, select, click the button element and bind the 'touchstart' or 'mousedown 'events in sequence to stop the event Propagation when the event is executed.