Selection is cancelled when TextInput is focused.
If you need to show selection when TextInput is focused,
you should delay (use Clock.schedule) the call to the functions for selecting text
(select_all, select_text).
#: import Clock kivy.clock.Clock
TextInput:
text: "Prefix"
on_focus: Clock.schedule_once(lambda dt: self.select_all()) if self.focus else None