when using input_dialog validation there is a bug where text validation does not occur upon clicking the OK button (With mouse or keyboard).
My suggested solution to fix this issue is to change the ok_handler method of the input_dialog so :
A new validation will occur upon clicking on the OK button
In case of validation error that focus will be brought back to the TextArea control
def ok_handler() -> None:
textfield.buffer.validate() # ---------> Perform validation
if textfield.buffer.validation_error is None: # ---------> Check for validation errors
get_app().exit(result=textfield.text)
else:
get_app().layout.focus(textfield) # -------------> Bring back the focus to the TextArea control
Hi,
when using input_dialog validation there is a bug where text validation does not occur upon clicking the OK button (With mouse or keyboard).
My suggested solution to fix this issue is to change the ok_handler method of the input_dialog so :
Thanks in advance :)