oddbird / oddbird/css-anchor-positioning

[BUG] Autoupdate functionality should clean up after itself.

Open
#240 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
493
Forks
18
Avg merge
12h 37m
Merged PRs (30d)
5

Description

The autoUpdate function used to update positioning when DOM elements move (or on scroll/resize) returns a cleanup function that should be called to remove observers.

It’s important that this function is only called/set-up when the floating element is open on the screen, and cleaned up when it’s removed. Otherwise, it can cause severe performance degradation, especially with many floating elements being created.

This is related to #91 (and partially implemented in #123).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the autoUpdate entry point and read the linked documentation, then review related issues #91 and #123 for the existing or partial implementation. Confirm how setup is triggered when a floating element opens and ensure the returned cleanup is called when it is removed, including when many elements are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.