Skip to content

feat: add toolbar checkboxes example#2381

Open
mattConnHarbour wants to merge 1 commit intomainfrom
SD-2164
Open

feat: add toolbar checkboxes example#2381
mattConnHarbour wants to merge 1 commit intomainfrom
SD-2164

Conversation

@mattConnHarbour
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented Mar 12, 2026

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8257d56fcc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +108 to +110
onReady: () => {
setTimeout(setupClickToToggle, 500);
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clear delayed toggle hook before replacing editor instance

The onReady callback defers setupClickToToggle with setTimeout, but the watch(file, ...) path destroys/recreates superdoc without cancelling any previously scheduled timeout. If a user changes documents quickly, the old timeout can run after superdoc points to the new instance and attach a duplicate selectionUpdate listener there, causing a single click/selection entry to toggle a checkbox twice (effectively no-op). Store the timeout id and clear it during teardown (or bind setup to a captured editor instance) to avoid duplicate handlers.

Useful? React with 👍 / 👎.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant