Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backspace in TextInput on android does not work with on_text_validate method #8267

Open
Neizvestnyj opened this issue May 31, 2023 · 1 comment

Comments

@Neizvestnyj
Copy link

Software Versions

  • Python: 3.10
  • OS: Android
  • Kivy: 2.2.0
  • Kivy installation method: pip

When we try to delete a character after the on_text_validate method is triggered, it is impossible to erase the characters in the text field, but I found out that its triggering is optional, it is enough to defocus the field with this method.

from kivy.app import App
from kivy.core.window import Window
from kivy.lang.builder import Builder

Window.keyboard_anim_args = {'d': .25, 't': 'in_out_expo'}
Window.softinput_mode = "below_target"

KV = """
BoxLayout:
    orientation: 'vertical'
    spacing: dp(10)
    padding: dp(10)
    
    TextInput:
        id: first
        hint_text: 'Simple text input'
        
    TextInput:
        id: first
        hint_text: 'Text input with `on_text_validate` method'
        on_text_validate: self.focus = False
        
    TextInput: # <- BUG
        id: first
        hint_text: 'Text input with `on_text_validate` method and `multiline: False`'
        on_text_validate: self.focus = False
        multiline: False
"""


class TestApp(App):
    def build(self):
        return Builder.load_string(KV)


TestApp().run()
DEMO.mp4
@misl6
Copy link
Member

misl6 commented Jun 4, 2023

I guess we have another issue to place into the list for #8226 😅

Added. Thank you for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants