core: Update a comment related to custom tab ordering

Turns out the existing implementation was right.
This commit is contained in:
Kamil Jarosz 2024-05-14 02:34:33 +02:00 committed by Nathan Adams
parent 94bd9be4b8
commit 8eb8673122
1 changed files with 2 additions and 2 deletions

View File

@ -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());
}