Open wvq opened 1 year ago
I want to control enable/disable on:tap, but:
<script> let on = View.prototype.addEventListener View.prototype.addEventListener = function (arg: string | GestureTypes, callback: (data: EventData) => void, thisArg?: any) { console.log(this, arg, callback) on.call(this, arg, callback, thisArg) } let disabled = true $: handleTap = disabled ? undefined : () => { console.log('tapped') } </script> <flexboxLayout on:tap={handleTap}>
why handleTap is undefined, but still call addEventListener.
undefined
@wvq alternatively you can use isUserInteractionEnabled https://stackoverflow.com/questions/41468742/nativescript-angular-2-disable-background-tap-events
isUserInteractionEnabled
I want to control enable/disable on:tap, but:
why handleTap is
undefined
, but still call addEventListener.