🐛 Fix problem with layout z-index
Some checks failed
Commit Message Check / Check Commit Message (push) Has been cancelled
CI / Code Linter (push) Has been cancelled
CI / Common Tests (push) Has been cancelled
CI / Frontend Tests (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Library Tests (push) Has been cancelled
CI / Build Integration Bundle (push) Has been cancelled
CI / Integration Tests 1/4 (push) Has been cancelled
CI / Integration Tests 2/4 (push) Has been cancelled
CI / Integration Tests 3/4 (push) Has been cancelled

This commit is contained in:
alonso.torres
2025-11-24 16:11:02 +01:00
committed by Belén Albeza
parent dedeae8641
commit dd5f3396d1
3 changed files with 5 additions and 4 deletions

View File

@@ -1641,9 +1641,9 @@ impl RenderState {
}
children_ids.sort_by(|id1, id2| {
let z1 = tree.get(id1).map_or_else(|| 0, |s| s.z_index());
let z2 = tree.get(id2).map_or_else(|| 0, |s| s.z_index());
z1.cmp(&z2)
let z1 = tree.get(id1).map(|s| s.z_index()).unwrap_or(0);
let z2 = tree.get(id2).map(|s| s.z_index()).unwrap_or(0);
z2.cmp(&z1)
});
}

View File

@@ -332,6 +332,7 @@ fn propagate_reflow(
}
_ => {
// Other shapes don't have to be reflown
reflow_parent = true;
}
}