Skip to content

Commit 2a2069d

Browse files
committed
fix(android): nestedScrollView is now a setting defaulting to false
1 parent 0fbc90c commit 2a2069d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/webview/index.android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ export class AWebView extends WebViewExtBase {
630630
public android: AndroidWebView;
631631

632632
public createNativeView() {
633-
const nativeView = new com.nativescript.webviewinterface.WebView(this._context);
633+
const nativeView = this.nestedScrollView === true ? new com.nativescript.webviewinterface.WebView(this._context, null) : new android.webkit.WebView(this._context, null);
634634
const settings = nativeView.getSettings();
635635

636636
// Needed for the bridge library

src/webview/index.common.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,13 @@ export class UnsupportedSDKError extends Error {
379379

380380
@CSSType('WebView')
381381
export abstract class WebViewExtBase extends ContainerView {
382+
/**
383+
* ANDROID: should the webview support nested scroll. Default to true
384+
*
385+
* Note: This can break some web views like maps pinch to zoom.
386+
*/
387+
public nestedScrollView: boolean;
388+
382389
public webConsoleEnabled: boolean;
383390

384391
public static readonly supportXLocalScheme: boolean;

0 commit comments

Comments
 (0)