How to Scroll Parent ScrollView when touch move up or down in the nest child ScrollView's area?

Hello,

I have nested scrollviews with:

  1. A Blue Vertical ScrollView
  2. And a Child yellow Horizontal ScrollView
    My question is:
  • How to disable scroll event in the child when user moves up or down in the yellow area ? ( in that case only blue scrollView event is working )

Please help me!

Thank you!

1 Like

Which version is used?

I’m using cocos creator latest version 3.6.2

NewProject_10.zip (10.2 KB)
Like this?

1 Like

I have the same problem with @thobn24h, so the problem is when I have a “MainScrollView” which is vertically scroll and “ChildScrollView” which is horizontally scroll, “ChildScrollView” is a child of “MainScrollView” content.

But, when touch location is touching “ChildScrollView”, I can’t scroll the “MainScrollView”

@Koei, my problem is Yellow scroll view is a child node of green scroll view, two scroll views are not sibling.

You can change the node tree structure yourself, is that not what you want either?

@Koei , what I need is:

  1. When user touch move up or down ( include touch area inside child scrollview ) → parent scrollview will active to enable user move all content up and down
  2. When user touch move left or right on child scrollview → only child scroll view is active that enable user scroll horizontal content

If you want to disable scrolling altogether, then you may need to just disable the scrollview component, the demo I provided just lets the click event pass through and can act on both scrollview nodes at the same time.