Skip to content
This repository was archived by the owner on Oct 16, 2026. It is now read-only.

fix(fuselage-hooks): update positions on document scroll - #2260

Closed
YashAnand69 wants to merge 1 commit into
RocketChat:mainfrom
YashAnand69:fix/position-root-scroll
Closed

YashAnand69 wants to merge 1 commit into
RocketChat:mainfrom
YashAnand69:fix/position-root-scroll

Conversation

@YashAnand69

Copy link
Copy Markdown

Proposed changes (including videos or screenshots)

Refresh positioned elements when the document viewport scrolls.

The existing observer only subscribes to ancestor-element scrolling and window resize. Add a passive scroll listener to the element's owning document and remove it during effect cleanup. Existing ancestor handling is preserved.

Issue(s)

Closes #2259

Further comments

  • Reproduced before the fix: dispatching document scroll produces no callback.
  • Full hooks suite: 51 suites / 141 tests pass, including viewport scrolling, non-bubbling ancestor scrolling and listener cleanup.
  • Package lint, formatting, TypeScript and diff checks pass; patch changeset included.
  • No component markup, styles or placement calculations changed. Tests verify event delivery; no real-browser geometry/visual regression claim.

AI assistance: implemented and tested with OpenAI Codex.

@changeset-bot

changeset-bot Bot commented Sep 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4da7e7a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@rocket.chat/fuselage-hooks Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@YashAnand69

Copy link
Copy Markdown
Author

Closing this fix because #2308 has merged and intentionally removed @rocket.chat/fuselage-hooks and its source from this monorepo. Resolving the resulting deletion conflict would restore a package upstream chose to remove. The fork branch is retained; no replacement PR is planned here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

usePosition: fixed popovers do not update when the document viewport scrolls

1 participant