react-native-view-shot icon indicating copy to clipboard operation
react-native-view-shot copied to clipboard

Use ScrollView to capture long pictures in iOS, the WebView outside the screen is blank

Open RocCaiy23 opened this issue 3 years ago • 6 comments

Android is normal, is it because wkwebview of ios will optimize the content outside the screen? Here is the code: `<ScrollView style={{ flex: 1 }}> <View collapsable={false} ref={(r) => { this.cpview = r; }} style={{ backgroundColor: '#fff' }}> ... </View> </ScrollView>

captureRef(this.cpview, { format: 'jpg', quality: 0.8, }).then((uri) => { ... }).catch(ex => { console.log(288, ex) });
`

RocCaiy23 avatar Dec 30 '20 05:12 RocCaiy23

Same issue here.

When i try to capture a long picture with ScrollView in iOS, the picture will crash and returning a blank jpg. Any updates?

react-native: v0.63 react-native-view-shot: v3.1.2

lovelyingtam avatar Apr 12 '21 03:04 lovelyingtam

Same issue here, webview content that is currently visible is captured, plus a bit more (about 30% of a screenful), but not the whole webview if it's more than 130% of the view port of the ScrollView.

JeremyBradshaw7 avatar May 16 '22 12:05 JeremyBradshaw7

Same issue. with webview inside ScrollView. Everything over the screen height is just blank. Webview has fix height, so no scrolling in the WebView itself. Taking webview outside the Scrollview does correctly capture full content.

Do have snapshotContentContainer set to true for scrollview capture.

TheDude70 avatar Jun 11 '22 05:06 TheDude70

Same issue here.

julio25frantz avatar Jun 23 '22 23:06 julio25frantz

Same issue here

israel-dv avatar Sep 01 '22 16:09 israel-dv

any update on this? I see the same issue using WebView on Android

shalinimekala avatar Feb 21 '23 14:02 shalinimekala