mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-24 05:40:15 +00:00
feat: support BackportSelectionTextField on iOS 18
This commit is contained in:
@@ -132,8 +132,8 @@ enum BackportNSGlassStyle {
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Backported `TextField` that supports text selection on macOS 15 and up. The `selection` has no
|
||||
/// effect on versions below macOS 15.
|
||||
/// Backported `TextField` that supports text selection on macOS 15/iOS 18 and up. The `selection`
|
||||
/// has no effect on versions below macOS 15/iOS 18.
|
||||
struct BackportSelectionTextField: View {
|
||||
private let titleKey: LocalizedStringKey
|
||||
@Binding private var text: String
|
||||
@@ -150,7 +150,7 @@ struct BackportSelectionTextField: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
if #available(macOS 15, *) {
|
||||
if #available(iOS 18.0, macOS 15, *) {
|
||||
TextField(
|
||||
titleKey,
|
||||
text: _text,
|
||||
|
||||
Reference in New Issue
Block a user