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
I don't know why it's like this.
The code should explain it all.
Code and Logs
fromkivy.langimportBuilderfromkivymd.appimportMDAppfromkivymd.uix.textfieldimportMDTextFieldKV="""BoxLayout: orientation: "vertical" padding: "100dp" WorkingField: Widget: BrokenField:<WorkingField> MDTextFieldHintText: text: "This hint text is working" MDTextFieldHelperText: text: "This helper text is working" mode: "on_focus"<BrokenField> MDTextFieldHintText: text: "This hint text is broken" MDTextFieldHelperText: text: "This helper text is broken" mode: "on_focus""""classWorkingField(MDTextField):
def__init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.bind(focus=self.fixed_on_focus)
deffixed_on_focus(self, _, __): # on_focus via self.bind works finepassclassBrokenField(MDTextField):
defon_focus(self, _, __): # on_focus via function name breaks the fieldpassclassExample(MDApp):
defbuild(self):
self.theme_cls.primary_palette="Orange"self.theme_cls.theme_style="Dark"returnBuilder.load_string(KV)
Example().run()
Description of the Bug
I don't know why it's like this.
The code should explain it all.
Code and Logs
Screenshots
Versions