Skip to content

Commit

Permalink
feat: Allow webview to load in background tab (react-native-webview#2930
Browse files Browse the repository at this point in the history
)

BREAKING CHANGE: This affects an existing loading behavior so we marked it as breaking, just in case

Co-authored-by: Peter Lazar <peter.lazar@limehome.de>
Co-authored-by: Thibault Malbranche <thibault@brigad.co>
  • Loading branch information
3 people committed Jun 10, 2023
1 parent 79a9cb6 commit 40c9807
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apple/RNCWebViewImpl.m
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,9 @@ - (WKWebViewConfiguration *)setUpWkWebViewConfig
return wkWebViewConfig;
}

- (void)didMoveToWindow
- (void)didMoveToSuperview
{
if (self.window != nil && _webView == nil) {
if (_webView == nil) {
WKWebViewConfiguration *wkWebViewConfig = [self setUpWkWebViewConfig];
_webView = [[RNCWKWebView alloc] initWithFrame:self.bounds configuration: wkWebViewConfig];
[self setBackgroundColor: _savedBackgroundColor];
Expand Down

0 comments on commit 40c9807

Please sign in to comment.