From 8eb8673122b02ee9e09b039d14c15a8dc8043fed Mon Sep 17 00:00:00 2001 From: Kamil Jarosz Date: Tue, 14 May 2024 02:34:33 +0200 Subject: [PATCH] core: Update a comment related to custom tab ordering Turns out the existing implementation was right. --- core/src/focus_tracker.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/focus_tracker.rs b/core/src/focus_tracker.rs index f9133004c..82bff8f95 100644 --- a/core/src/focus_tracker.rs +++ b/core/src/focus_tracker.rs @@ -243,8 +243,8 @@ impl<'gc> FocusTracker<'gc> { tab_order.retain(|o| o.tab_index().is_some()); // Then, items are sorted according to their tab indices. - // TODO When two objects have the same index, the behavior is undefined. - // We should analyze and match FP's behavior here if possible. + // When two objects have the same index, they are ordered by + // their respective positions in hierarchy as returned by fill_tab_order(). tab_order.sort_by_key(|o| o.tab_index()); }