最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Getting jerks while slowly scrolling react native webviewwebshell NaiveAutoheightWebView - Stack Overflow

programmeradmin1浏览0评论
<NaiveAutoheightWebView
            key={`webview-${i}`}
            androidHardwareAccelerationDisabled
            overScrollMode="never"
            androidLayerType={'none'}
            javaScriptEnabled={true}
            scrollEnabled={false}
            bounces={false}
            javaScriptEnabledAndroid={true}
            allowsFullscreenVideo={false}
            ignoreSslError={true}
            source={{ html: seperateHtml(parts[i]) }}
            scalesPageToFit={true}
            onMessage={onWebViewMessage}
            contentInsetAdjustmentBehavior="automatic"
            injectedJavaScript={`
                            document.body.style.userSelect = 'none';
                            window.ReactNativeWebView.postMessage(Math.max(document.body.offsetHeight, document.body.scrollHeight));
                            `}
            startInLoadingState={true}
            onLoad={() => {
              setLoadingWebview(false);
            }}
            onLoadEnd={() => {
              setLoadingWebview(false);
            }}
            onError={() => {
              setLoadingWebview(false);
            }}
            parentMsid={htmlBody?.msid}
          />

While scrolling slowly on android/ios, it suddenly scrolls the page up and every time have to find last read line.

发布评论

评论列表(0)

  1. 暂无评论