Skip to content

Commit 6e7c311

Browse files
authored
Fix dragging on content placed above the trackedView resets scroll position (#527)
Changed how `initialScrollOffset` is set. This issue was described in #526.
1 parent e39f634 commit 6e7c311

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/Core.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ class Core: NSObject, UIGestureRecognizerDelegate {
710710
if stopScrollDeceleration {
711711
DispatchQueue.main.async { [weak self] in
712712
guard let self = self else { return }
713-
713+
714714
self.stopScrolling(at: self.initialScrollOffset)
715715
}
716716
}
@@ -801,7 +801,7 @@ class Core: NSObject, UIGestureRecognizerDelegate {
801801
if grabberAreaFrame.contains(location) {
802802
initialScrollOffset = scrollView.contentOffset
803803
} else {
804-
initialScrollOffset = contentOffsetForPinning(of: scrollView)
804+
initialScrollOffset = scrollView.contentOffset
805805
let offsetDiff = scrollView.contentOffset - contentOffsetForPinning(of: scrollView)
806806
switch layoutAdapter.position {
807807
case .top, .left:

0 commit comments

Comments
 (0)