Relative Content

Tag Archive for iosswiftswiftuitextselection

SwiftUI text selection and sheet presentation conflict

I’m developing a SwiftUI application that includes a view displaying artwork details. This view contains several text fields with .textSelection(.enabled) to allow users to select text. However, I’m facing an issue: when I’m in text selection mode and tap outside the text fields, the selection should simply disappear. Instead, tapping outside triggers the opening of a BottomSheetView.