Merge pull request #62573 from KoBeWi/🥶

This commit is contained in:
Rémi Verschelde 2022-07-01 00:47:56 +02:00 committed by GitHub
commit afdae67cc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2422,7 +2422,7 @@ Control *Control::find_next_valid_focus() const {
} }
} }
if (next_child == from) { // No next control. if (next_child == from || next_child == this) { // No next control.
return (get_focus_mode() == FOCUS_ALL) ? next_child : nullptr; return (get_focus_mode() == FOCUS_ALL) ? next_child : nullptr;
} }
if (next_child) { if (next_child) {
@ -2506,7 +2506,7 @@ Control *Control::find_prev_valid_focus() const {
} }
} }
if (prev_child == from) { // No prev control. if (prev_child == from || prev_child == this) { // No prev control.
return (get_focus_mode() == FOCUS_ALL) ? prev_child : nullptr; return (get_focus_mode() == FOCUS_ALL) ? prev_child : nullptr;
} }