Skip to content

fix(tasks): prevent stack overflow on heavy emoji toggle#18

Open
messiawrq-design wants to merge 1 commit into
CodeBountyOrg:mainfrom
messiawrq-design:fix-emoji-crash
Open

fix(tasks): prevent stack overflow on heavy emoji toggle#18
messiawrq-design wants to merge 1 commit into
CodeBountyOrg:mainfrom
messiawrq-design:fix-emoji-crash

Conversation

@messiawrq-design
Copy link
Copy Markdown

Fixes #10.

When toggling a task with complex ZWJ emoji sequences (like 👨‍👩‍👧‍👦) in Safari, synchronous DOM replacement via render() can trigger a stack overflow during event dispatch.

Wrapping the state update and render in a setTimeout breaks the call stack and prevents the browser crash.

Bounty Wallet: 6sF8p22Gg83NKTJ6dvya7Srv4USCniZnP47DwQwK7Mtp (Solana) / Algora

Fixes CodeBountyOrg#10. When toggling a task with complex ZWJ emoji sequences
(like 👨‍👩‍👧‍👦) in Safari, synchronous DOM replacement via `render()`
can trigger a stack overflow during event dispatch. Wrapping the state
update and render in a `setTimeout` breaks the call stack and
prevents the browser crash.

Bounty Wallet: 6sF8p22Gg83NKTJ6dvya7Srv4USCniZnP47DwQwK7Mtp (Solana) / Algora
@codebounty-dev-bot
Copy link
Copy Markdown

⚠️ Attention Sponsor: This PR was submitted by @messiawrq-design who has not applied for this bounty (#10). Please verify if you want to consider this contribution.

👋 Hey @messiawrq-design: This issue has a bounty on CodeBounty! To be eligible for the reward, please sign up on CodeBounty and apply for this bounty. If you apply, your PR will be automatically associated with your application.

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.

Fix crash when task title contains emoji

1 participant