Open droopram opened 7 years ago
Having this same issue, did you figure out a workaround?
@lukeramsden you could ty to set isUserInteractionEnabled:
<ListView isUserInteractionEnabled="false" items="{{ source }}" loaded="onLoaded" itemLoading="onItemLoading" itemTap="onItemTap">
as described here https://github.com/NativeScript/NativeScript/issues/2892
i had the same issue
@droopram
Try this out:
<ScrollView :isScrollEnabled="allowScrolling">
Then create the data property:
data() {
return {
allowScrolling: true
};
}
This will allow scrolling by default.
Then pass the allowScrolling value as a prop to your child component and watch the child component: (I'm using single file components, you may not need this)
:scrolling="allowScrolling"
v-on:allowScrolling="allowScrolling = $event"
Inside your child component, add a button to toggle scrolling on and off
<Button text="Tap to Sign" @tap="toggleScrolling(event)"/>
Finally, add a method to emit the new value to the parent component:
toggleScrolling(event) {
this.$emit("allowScrolling", !this.scrolling);
}
Hopefully this gets you closer to a workable solution.
This is my workaround (Nativescript-Vue)
<ScrollView ref="scrollView>
<StackLayout>
<DrawingPad @touch="onSignatureTouch" />
</StackLayout>
</ScrollView>
onSignatureTouch(args) {
if (args.android) return;
if (args.action === "down") this.$refs.scrollView.nativeView.ios.scrollEnabled = false;
else if (args.action === "up") this.$refs.scrollView.nativeView.ios.scrollEnabled = true;
}
I have the following XML (not exactly but the gist is the same):
When I try to draw vertical lines, the scrollview takes over and scrolls the page instead of drawing within the pad.. Any idea's on how to fix this? Thanks!