Skip to content

fix!: make smooth scrolling completion reliable - #1075

Open
stipsan wants to merge 1 commit into
mainfrom
tembo/cssom-scroll-update
Open

stipsan wants to merge 1 commit into
mainfrom
tembo/cssom-scroll-update

Conversation

@stipsan

@stipsan stipsan commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Smooth scrolling now completes reliably for zero-duration animations, disconnected targets, and custom easing functions, and preserves custom behavior return values. Final animation coordinates always reach the requested destination.

  • Forward container/options to the base ponyfill and improve types for smooth action-array completion and standard native completion.
  • Resolve disconnected smooth calls to an empty action array and avoid NaN for zero duration.
  • Keep custom callback results unchanged, including no-op calls, and add regressions for completion and container forwarding.
  • Accept the upcoming base ponyfill major with ^3.1.0 || ^4.0.0 and include a major changeset.

Migration: the default smooth completion is explicitly typed as Promise<SmoothScrollAction[]>; standard behavior inherits the base ponyfill's native completion contract when using its new major. Custom callbacks may run with an empty action list. Native ScrollResult and the add-on's animation action array are distinct results.

Validation: Node 26 typecheck and production build; all 12 tests passed. Coordinated integration with the updated local engine and base ponyfill also passed.

Release dependency: publish the engine, then the base ponyfill major, then this add-on major. The lockfile retains the published base ponyfill until that release exists; refresh it after publication.

Related PRs in release order:

  1. feat: align scroll geometry with current CSSOM behavior compute-scroll-into-view#930
  2. feat!: support native scroll completion and consistent defaults scroll-into-view-if-needed#1226
  3. fix!: make smooth scrolling completion reliable #1075
  4. docs: refresh scrolling standards and compatibility guidance scroll-into-view.dev#1127

Want tembo to make any changes? Add a comment with @tembo and i'll get back to work!

View on Tembo  Review in Tembo  View Agent Settings

Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tembo Pull request created by Tembo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant