fondle
Prevent mobile browser page scroll when touch.(Just like: Wechat, Safari ...);
Installation
npm install --save fondle
How to Use
app.scss
The container need have scrollbar and high enough to cover the screen.
#container
app.js
For React
import React Component from 'react'; import fondle from 'fondle'; let entity; { entity = ; } { entity; } { entity; } { return <div ="container"> <div ="content"> ... </div> </div> ; }
For Classic
Something you should know about MutationObserver.
; const dom = ;const entity = ; const observer = ;const observerOff = ; observer; observerOff;
... ...