Post

Replies

Boosts

Views

Activity

Crash when typing Japanese in TextEditor with TextSelection binding.
Environment Mac mini M4 Pro macOS: Version 15.1.1 (24B2091) Xcode: Version 16.1 (16B40) IME: Kotoeri, Google IME Code description struct ContentView: View { @State var text = “” @State var selection: TextSelection? var body: some View { VStack { TextEditor(text: $text, selection: $selection) } .padding() } } Issue Description When built for macOS (not Catalyst, Designed for iPad) and typing “あ” in Japanese input, it crashes. I tried using Kotoeri's Kana input, Kotoeri's Roman input, and Google IME, but the same error occurs and crashes in both cases. There is no issue when using English input. Errors (input method 56222 com.apple.inputmethod.Kotoeri.KanaTyping) (1): Fatal error: String index is out of bounds (input method 56338 com.apple.inputmethod.Kotoeri.RomajiTyping (1): Fatal error: String index is out of bounds Swift/StringUTF16View.swift:368: Fatal error: String index is out of bounds
1
0
134
1w