You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A text selection box is overlaid at the right position
Actual behavior
There does not appear to be a box of any sort
Steps to reproduce
structContentView:View{varbody:someView{NavigationStack{NavigationLink{StructuredText(markdown:"enim tempor cillum excepteur dolor Lorem est laboris consequat sunt aliquip et commodo excepteur id adipisicing exercitation in irure deserunt et duis proident enim proident labore deserunt proident enim nostrud Lorem sit laborum sit incididunt nostrud ullamco excepteur aute consequat").textual.textSelection(.enabled).padding()} label:{Text("Go to body")}}}}
ScreenRecording_06-30-2026.11-51-04_1.MP4
Noticing how it corrected itself after a phone rotation, here's a potential workaround:
structContentView:View{@Statevartext:String=""varbody:someView{NavigationStack{NavigationLink{StructuredText(markdown: text).textual.textSelection(.enabled).padding().onAppear{
text ="enim tempor cillum excepteur dolor Lorem est laboris consequat sunt aliquip et commodo excepteur id adipisicing exercitation in irure deserunt et duis proident enim proident labore deserunt proident enim nostrud Lorem sit laborum sit incididunt nostrud ullamco excepteur aute consequat"}} label:{Text("Go to body")}}}}
It must have something to do with the layout engine. Also under extreme circumstances (Transmission's DestinationLink) the app crashes when selecting, with an index out of bounds error (file: TextLayoutCollection+Positioning, L78, where layouts is empty)
Textual version information
0.5.0
Destination operating system
iOS 27 DP 2
Xcode version information
Version 27.0 beta (27A5194q)
Swift Compiler version information
swift-driver version: 1.167 Apple Swift version 6.4 (swiftlang-6.4.0.20.104 clang-2100.3.20.102)
Target: arm64-apple-macosx27.0.0
Description
If a
StructuredTextis nested inside aNavigationLink:destination, on its first appearance text selection does not work properly.Checklist
mainbranch of this package.Expected behavior
A text selection box is overlaid at the right position
Actual behavior
There does not appear to be a box of any sort
Steps to reproduce
ScreenRecording_06-30-2026.11-51-04_1.MP4
Noticing how it corrected itself after a phone rotation, here's a potential workaround:
It must have something to do with the layout engine. Also under extreme circumstances (Transmission's
DestinationLink) the app crashes when selecting, with an index out of bounds error (file: TextLayoutCollection+Positioning, L78, wherelayoutsis empty)Textual version information
0.5.0
Destination operating system
iOS 27 DP 2
Xcode version information
Version 27.0 beta (27A5194q)
Swift Compiler version information