@craft-native/ios 0.0.172 → 0.0.173
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
package/templates/CraftApp.swift
CHANGED
|
@@ -561,7 +561,13 @@ struct CraftApp: App {
|
|
|
561
561
|
.ignoresSafeArea(.keyboard, edges: .bottom)
|
|
562
562
|
} else if appState.config.renderer == "native" {
|
|
563
563
|
// One native screen and its stack: no paths, no tabs.
|
|
564
|
+
// The screen keeps itself out of the keyboard's way (its
|
|
565
|
+
// own bottom safe area, CraftNativeScreen.swift); SwiftUI
|
|
566
|
+
// shrinking it as well took the keyboard's height twice,
|
|
567
|
+
// and a screen's scroll views and text views were squeezed
|
|
568
|
+
// to nothing whenever the keyboard came up.
|
|
564
569
|
CraftNativeScreen(config: appState.config)
|
|
570
|
+
.ignoresSafeArea(.keyboard, edges: .bottom)
|
|
565
571
|
} else {
|
|
566
572
|
// The page's own chrome, drawn natively over it: the tab
|
|
567
573
|
// bar the page asks for, and the splash until it is ready.
|
|
@@ -5398,6 +5398,12 @@ final class CraftNativeScreenController: UIViewController, UIScrollViewDelegate,
|
|
|
5398
5398
|
view.accessibilityValue = [current, message].compactMap { $0 }.joined(separator: ", ")
|
|
5399
5399
|
}
|
|
5400
5400
|
}
|
|
5401
|
+
// A multiline TextInput is a UITextView, which works out its traits
|
|
5402
|
+
// as it goes: while it has the keyboard they say it is editing, and
|
|
5403
|
+
// that is what UI tests and VoiceOver read focus from. Setting them
|
|
5404
|
+
// froze them, so it read as static text that never had focus ("neither
|
|
5405
|
+
// element nor any descendant has keyboard focus"); it keeps its own.
|
|
5406
|
+
if view is UITextView { return }
|
|
5401
5407
|
view.accessibilityTraits = traits
|
|
5402
5408
|
}
|
|
5403
5409
|
|