Repository navigation
fix: capture stopped scroll pixels before native activation - #58
Merged
Merged
Conversation
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.
A native tap immediately after a fling can stop scrolling but still open an overlay with every native control missing. Scroll invalidation was cancelling the unacquired request before its replacement reached native, leaving nothing to promote at contact. The real Capacitor/Ionic reproduction showed zero images during the overlay; idle presentation showed three.
Keep a live, unacquired request across scroll-origin
changemessages until the nextpreparereplaces it. Contact then uses the existing pre-dispatch ordering: stop momentum → apply layout → measure current frames → acquire pixels → dispatch input. It does not wait for another idle period. PNG encoding, delivery and decoding remain asynchronous.Scroll notification responsibilities are documented in the integration guide:
Both document observation and renderer
changed(owner)remain necessary for standalone/background and Shadow DOM scrolls respectively. Light DOM can traverse both paths. Time/position deduplication is deferred because capture-generation boundaries also matter; this fix adds no deduplication state.Validation:
JavaScript runtime and iOS native code must be adopted together. Release Engine first, then update the Capacitor/Core dependency and synchronize Cordova to that Core revision.