<ScrollView
ref={scrollRef}
horizontal
scrollEnabled={isScroll}
contentContainerStyle={{height: HEIGHT, overflow: 'hidden'}}
style={{
width: metrics.screenWidth - widthOffset,
}}
onScroll={_onScroll}>
<WebView
ref={webviewRef}
automaticallyAdjustContentInsets={false}
scrollEnabled={false}
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
onLoadEnd={_loadEnd}
bounces={false}
source={{
html: getHtml(final, scale),
}}
style={{
height: HEIGHT,
width: WIDTH,
backgroundColor: 'transparent',
}}
onMessage={_onMessage}
javaScriptEnabled={true}
textZoom={90}
/>
</ScrollView>
also there is
source.replace(
'<img',
'<img ontouchend="window.ReactNativeWebView.postMessage(`imgsrc__`+this.src)"',
)
so the problem is when I scroll this scrollview over the html img it gets the touch and the phone vibrates. Is there any way to disable webview hapticfeedback either from source end(html) or from react-native-webview end ?
I think this is because while scrolling the img tag takes the interaction as longtouch so therefore it enables longtouch in webview.
android:hapticFeedbackEnabled="false"
to yourManifest.xml
see here: https://mcmap.net/q/709670/-how-to-completely-remove-mobile-browser-long-press-vibration – Footwear