html prevent scrolling also prevents html5 input type range -
i have html web app, , adding sliders so:
<form oninput="output1.value=slider1.value"> <input type="range" name="slider1" value="50"/> <output name="output1" for="slider1">50</output> </form>
works great on web, , on device.
now, when add together in preventdefault code stop page scrolling breaks:
document.addeventlistener( 'touchmove' , function(e) {e.preventdefault()} , false );
now, if own control, prepare it, want default behavior of html5 slider, how can back?
not sure duplicate, in case:
function stopscrolling( touchevent ) { if ((touchevent.target.id != "pastgenslider") && (touchevent.target.id != "curgenslider")) touchevent.preventdefault(); } document.addeventlistener( 'touchmove' , stopscrolling , false );
just check id element has, , if want allow process, allow pass/do not phone call preventdefault();
html5 html-input
No comments:
Post a Comment