mkko / DrawerView

A drop-in view, to be used as a drawer anywhere in your app
MIT License
375 stars 57 forks source link

Cannot reliably scroll horizontally with nested scrollView #67

Open KesWalker opened 3 months ago

KesWalker commented 3 months ago

I use the DrawerViewto host my SwiftUI views like so:

VStack{
  ScrollView(.vertical){
    ScrollView(.horizontal){
      AnyView()
    }
  }
}

Trouble is, unless I scroll perfectly horizontally, the drawer view tries to close/open if my finger moves up or down slightly.

This will even happen when the parent ScrollView(.vertical) is scrolled to the bottom, meaning I will end up with a collapsed drawer view but the ScrollView(.vertical) won't be scrolled to the top.

mkko commented 3 months ago

Hi @KesWalker! Thank you for bringing this up.

I haven't really tried the view with SwiftUI. Any chance to provide a minimal example where this occurs?