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
Is your feature request related to a problem? Please describe.
When you're pressing backspace on a long TextInput, you stop seeing the characters. So you simply do not know what you're erasing. You need to guess what you are erasing, or you need to memorize the order of characters to know exactly what you're erasing, or you need to manually move the cursor to know where you are, because the scroll_x update is not being handled properly.
Describe the solution you'd like
If the TextInput has text, any part of the text should be visible. If the text "Hello World is Awesome" is written on a TextInput and you delete the "is Awesome", you should still be able to see "Hello World". I think we just need to update the scroll_x after the backspace has already been handled.
Video showing the issue
textinput_do_backspace-2023-11-30_22.40.32.mp4
The text was updated successfully, but these errors were encountered:
fromkivy.appimportAppfromkivy.langimportBuilderfromkivy.uix.textinputimportTextInputfromkivy.propertiesimportNumericPropertykv="""AnchorLayout: ScrollBackTextInput: size_hint: None, None size: dp(150), dp(30) multiline: False scroll_back: self.width - 20 # scroll back is related to the size of the text box"""classScrollBackTextInput(TextInput):
scroll_back=NumericProperty(90)
defon_text(self, *args):
ifself.x+self.padding[0] >=self.cursor_pos[0]:
# cursor is on left hand side, padding[0] is padding on the left# if the cursor hits the left hand side, scroll to the leftself.scroll_x=max(0, self.scroll_x-self.scroll_back)
classTiTestApp(App):
defbuild(self):
returnBuilder.load_string(kv)
TiTestApp().run()
Is your feature request related to a problem? Please describe.
When you're pressing backspace on a long
TextInput
, you stop seeing the characters. So you simply do not know what you're erasing. You need to guess what you are erasing, or you need to memorize the order of characters to know exactly what you're erasing, or you need to manually move the cursor to know where you are, because thescroll_x
update is not being handled properly.Describe the solution you'd like
If the
TextInput
has text, any part of the text should be visible. If the text "Hello World is Awesome" is written on aTextInput
and you delete the "is Awesome", you should still be able to see "Hello World". I think we just need to update thescroll_x
after the backspace has already been handled.Video showing the issue
textinput_do_backspace-2023-11-30_22.40.32.mp4
The text was updated successfully, but these errors were encountered: