mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-15 01:07:22 +00:00
Fix auto-capitalization in the keyboard when the text box is empty. (#2483)
Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
parent
a69ae93871
commit
c27d4d78f9
1 changed files with 3 additions and 3 deletions
|
@ -309,9 +309,9 @@ static void text_input_handle_ok(TextInput* text_input, TextInputModel* model, b
|
|||
char selected = get_selected_char(model);
|
||||
size_t text_length = strlen(model->text_buffer);
|
||||
|
||||
bool toogle_case = text_length == 0;
|
||||
if(shift) toogle_case = !toogle_case;
|
||||
if(toogle_case) {
|
||||
bool toggle_case = text_length == 0 || model->clear_default_text;
|
||||
if(shift) toggle_case = !toggle_case;
|
||||
if(toggle_case) {
|
||||
selected = char_to_uppercase(selected);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue