Changes since 24.9.25
Fixes
-
Avoid NPE when canceling a JavaScript invocation of a closed UI (#25095) (CP:24.9)
Commit · Pull request · IssueInvocations owned by an invisible component are retained in the UI's queue and get a detach listener registered for them. Registering that listener installs a handler on the invocation itself, and the handler stays attached to the invocation for the rest of its lifetime, since there is no way to unsubscribe it. A component that keeps the PendingJavaScriptResult and cancels it after being reused in another UI therefore runs the handler installed by the closed UI, which dereferences its cleared session. Return early when the UI no longer has a session, as its invocation queue has already been released by then. Also release the retained invocations when the UI is closed, so that the queue and the detach listener registrations on the state nodes do not outlive the UI when a detach listener fails and prevents the ones after it from running. (cherry picked from commit 8f059b2)
-
Keep replaced children until the new ones are in place (#25147) (CP: 24.9)
Commit · Pull request · IssueWhen the server clears a container and refills it in the same round trip, the client applied the two changes as separate steps: the clear emptied the container, and only then were the replacements inserted. While the container is empty the scrollable range around it collapses, and a layout in that window makes the browser reduce the scroll offset and keep the reduced value once the contents are back. Firefox runs into this with content that gets its size asynchronously, such as a FormLayout, so a surrounding Scroller jumps back towards the top after a rebuild. The children of a cleared node are now removed once the whole change set has been applied, so the replacements are attached while the old nodes are still there and the container is never empty. Nodes that the server moved to another parent and nodes that it added back to the same parent are left alone. A clear with no replacements still empties the container right away.