@craft-native/ios 0.0.410 → 0.0.413
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -11133,6 +11133,16 @@ final class CraftNativeScreenController: UIViewController, UIScrollViewDelegate,
|
|
|
11133
11133
|
if self.keyboardScreenFrame != nil { self.insetScrollViewsForKeyboard() }
|
|
11134
11134
|
guard let scroll = self.enclosingVerticalScroll(of: textView),
|
|
11135
11135
|
let rect = self.caretRect(of: textView, in: scroll) else { return }
|
|
11136
|
+
// UIKit's text view scrolls this scroll view itself, animated, when
|
|
11137
|
+
// the keyboard finishes appearing. Arriving after an edit and
|
|
11138
|
+
// before this pass, it aims at the caret of the stale layout (the
|
|
11139
|
+
// input's top), and while it runs it carries any offset set here
|
|
11140
|
+
// back toward that target. This pass measured the current layout:
|
|
11141
|
+
// stop that animation so the caret stays where it can be seen. A
|
|
11142
|
+
// finger's drag or fling is the person's, and is left alone.
|
|
11143
|
+
if !scroll.isTracking && !scroll.isDecelerating {
|
|
11144
|
+
scroll.setContentOffset(scroll.contentOffset, animated: false)
|
|
11145
|
+
}
|
|
11136
11146
|
let visible = scroll.bounds.inset(by: scroll.adjustedContentInset)
|
|
11137
11147
|
guard !visible.contains(rect) else { return }
|
|
11138
11148
|
scroll.scrollRectToVisible(rect, animated: false)
|