Fix #5069: null-guard layered pane parent in InteractionDialog popup#5070
Merged
Conversation
showPopupDialogImpl dereferenced getLayeredPane(f).getParent() twice when sizing the popup. The parent can be transiently null when a prior formMode InteractionDialog was just disposed -- cleanupLayer detaches the inner FormLayer container from its parent and the next popup can observe the intermediate state before the form is fully relaid out. Treat a null parent like a zero-sized one and fall back to the display dimensions (matching the existing fallback for getHeight()/getWidth() == 0). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
c2838dc to
4679373
Compare
Contributor
Cloudflare Preview
|
Contributor
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Collaborator
Author
|
Compared 116 screenshots: 116 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
Collaborator
Author
|
Compared 116 screenshots: 116 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
Collaborator
Author
|
Compared 115 screenshots: 115 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #5069.
InteractionDialog.showPopupDialogImplwas dereferencinggetLayeredPane(f).getParent()to size the popup against the available area:That parent can be momentarily null — e.g. when a previous
formModeInteractionDialogwas just disposed:cleanupLayercallsc.remove()on the innerFormLayercontainer, detaching it fromformLayeredPanewhile a form animation may still be in flight, and the next popup can see the intermediate state. The reporter hit this on 7.0.244 with a chained dismiss-then-show flow involving formMode dialogs.The fix grabs the parent once, treats
nullthe same way the existing code already treats a zerogetHeight()/getWidth(), and falls back to the display dimensions. No behavior change in the common path.Test plan
mvn -pl core -am compile -DskipTests(JDK 8) — clean build.🤖 Generated with Claude Code