Skip to content

Commit

Permalink
Fix update_focus_chain pass (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
PoignardAzur authored Sep 17, 2024
1 parent 7679e7c commit d758ae5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions masonry/src/passes/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,6 @@ fn update_focus_chain_for_widget(
widget_children: widget.children.reborrow_mut(),
};
widget.item.lifecycle(&mut ctx, &LifeCycle::BuildFocusChain);

if !state.item.is_disabled {
parent_focus_chain.extend(&state.item.focus_chain);
}
}
state.item.update_focus_chain = false;

Expand All @@ -534,6 +530,10 @@ fn update_focus_chain_for_widget(
},
);

if !state.item.is_disabled {
parent_focus_chain.extend(&state.item.focus_chain);
}

// had_focus is the old focus value. state.has_focus was replaced with parent_ctx.is_focused().
// Therefore if had_focus is true but state.has_focus is false then the widget which is
// currently focused is not part of the functional tree anymore
Expand Down

0 comments on commit d758ae5

Please sign in to comment.