mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix: default view to clickable so touches dont get “passed through”
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user