Skip to content

fix(web): search after unmount, hidden tabs, draw errors, shake undo - #41

Open
SectionTN wants to merge 6 commits into
feat/web-edit-menufrom
fix/web-selection-followups
Open

SectionTN wants to merge 6 commits into
feat/web-edit-menufrom
fix/web-selection-followups

Conversation

@SectionTN

@SectionTN SectionTN commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

four fixes, plus one in the example and a small cleanup:

  1. findNext, findPrevious, replaceCurrent and replaceAll on an unmounted editor waited for matches that never came, so an app awaiting one after closing a file hung forever. they resolve at once with null, false or 0 now, like clearSearch already did.
  2. an editor opened or edited in a background tab never parsed, because the engine only started work from an animation frame and a hidden tab gets none. it starts from a posted task while the tab is hidden now.
  3. when two editors threw while drawing the same frame, only the first error reached the console and the page's error handlers. each error is rethrown in its own microtask now.
  4. on iOS, shaking to undo after typing in another field undid that field's text and moved the focus there, even with the editor focused. WebKit sends the undo as a cancelable beforeinput aimed at the other field, so the editor cancels it and undoes its own text.

the example stops Safari zooming in when the find bar takes the focus, and the cache move of an edit loses a branch it could never reach.

stacked on #40 (its own commits)

findNext, findPrevious, replaceCurrent and replaceAll on an editor that
had unmounted waited for fresh matches that never came, so an app
awaiting one after closing a file hung forever. They now resolve at
once with null, false or 0, as clearSearch already did.
An editor opened or edited in a background tab never parsed, because
the engine only started its work from an animation frame and a hidden
tab gets none, so its highlight waited until the tab came back. The
engine now starts from a posted task while the tab is hidden and keeps
going without waiting for a frame there.
When two editors on a page threw while drawing the same frame, only the
first error reached the console and the page's error handlers, so the
second failure stayed hidden until the first was fixed. Each error is
now rethrown in its own microtask.
On iOS, shaking to undo after typing in another field on the page undid
that field's text and moved the focus there, even while the editor was
focused. WebKit sends the undo as a cancelable beforeinput aimed at the
other field, so the editor now cancels it and undoes its own text.
@coderabbitai

coderabbitai Bot commented Nov 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e11f80fa-e7d1-46eb-90cd-b32134c5d58b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
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