8000 fix(core): release a reveal whose element has focus at the start by morellodev · Pull Request #330 · awesome-reveal/awesome-reveal · GitHub
[go: up one dir, main page]

Skip to content

fix(core): release a reveal whose element has focus at the start - #330

Merged
morellodev merged 2 commits into
nextfrom
fix/core-focused-release
Oct 21, 2026
Merged

morellodev merged 2 commits into
nextfrom
fix/core-focused-release

Conversation

@morellodev
@morellodev morellodev commented Oct 21, 2026 •
Copy link
Copy Markdown
Collaborator

Summary

When a target already has focus at the start, observe() calls its callback at once, and the callback cancelled the animations with group.dispose(). reveal() and cascade() read animation.finished after that cancel, and cancel() replaces finished with a new promise. That promise stays pending, so the reveal was never released, and the listener for reduced motion kept the target until an explicit dispose().

The focus branch now calls release(), which disconnects, cancels the group and removes the listener at once. The release no longer depends on the order of the finished read. disconnect is set after observe() returns, because the callback can run before that.

A browser test in "release without dispose" focuses a link in the target before reveal() and expects that all listeners are removed. It fails in Chromium without the fix. cascade() uses the same start() function and release path as reveal(), so the test covers both. A separate cascade test would only duplicate it.

Checklist

  • The PR targets the next branch.
  • The PR title follows Conventional Commits. A breaking change has ! and a BREAKING CHANGE: footer.
  • Tests cover the change.
  • A change to an option, a default or an export also updates the READMEs, the consumer skills and the examples. Does not apply: no option, default or export changes.

@morellodev
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
chatgpt-codex-connector Bot commented Oct 21, 2026 •
Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T15:01:37.543232Z 82e2413 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 82e2413997

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@morellodev
morellodev merged commit bcd0c77 into next Oct 21, 2026
19 checks passed
@morellodev
morellodev deleted the fix/core-focused-release branch October 21, 2026 16:17
@morellodev morellodev mentioned this pull request Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0