From 8aa2ef867c5e5b271f3a020152e101be3b051933 Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Mon, 23 Nov 2020 11:14:41 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20default=20view=20to=20clickable=20so=20t?= =?UTF-8?q?ouches=20dont=20get=20=E2=80=9Cpassed=20through=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/ui/core/view/index.android.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/core/ui/core/view/index.android.ts b/packages/core/ui/core/view/index.android.ts index 8f288dba0..37536aa03 100644 --- a/packages/core/ui/core/view/index.android.ts +++ b/packages/core/ui/core/view/index.android.ts @@ -465,7 +465,10 @@ export class View extends ViewCommon { public initNativeView(): void { super.initNativeView(); this._isClickable = this.nativeViewProtected.isClickable(); - + if (this.nativeViewProtected.setClickable) { + this.nativeViewProtected.setClickable(this.isUserInteractionEnabled); + } + if (this.hasListeners(ViewCommon.layoutChangedEvent)) { this.setOnLayoutChangeListener(); } @@ -492,10 +495,6 @@ export class View extends ViewCommon { this.nativeViewProtected.setOnTouchListener(this.touchListener); this.touchListenerIsSet = true; - - if (this.nativeViewProtected.setClickable) { - this.nativeViewProtected.setClickable(this.isUserInteractionEnabled); - } } private setOnLayoutChangeListener() {