Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ public void setContent(Node newView, AnimationProducer transition,
duration, interpolator);
newAnimation.setOnFinished(e -> {
setMouseTransparent(false);
getChildren().remove(previousNode);
if (previousNode != currentNode) {
getChildren().remove(previousNode);
}
Comment on lines 83 to +87

Copilot AI Jan 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onFinished can still run after a newer setContent(...) call has already started (or is about to start) another transition. In that case this callback may (a) call setMouseTransparent(false) too early for the newer transition, and (b) remove a node that a newer transition is currently animating (even if it’s not currentNode). Consider tracking a monotonically increasing transition/id (or storing the currently active Animation) and in onFinished only performing cleanup when this callback corresponds to the latest transition.

Copilot uses AI. Check for mistakes.

if (cacheHint != null) {
newView.setCache(false);
Expand Down
Loading