Skip to content

Fixing Search (CTRL+F) Doesn't Auto-Update After Content Changes Dyna… #3368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Jatin24062005
Copy link
Contributor

@Jatin24062005 Jatin24062005 commented Mar 6, 2025

…mically

This PR fixes an issue where the search match counter does not update dynamically when content is modified. It also ensures that the counter resets correctly when switching between files in the CodeMirror editor.

Fixes #issue-#3367

Changes:
Add a change event listener to detect content modifications and restart the search

p5.js.Web.Editor.-.Google.Chrome.2025-03-06.17-32-56.mp4

Issue Addressed:
Search results do not auto-update when new content is added.
Search match counter does not reset when switching between files.
Includes improvements from another pending PR #3362 that fixes a similar issues-#3361 & #2125

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

…mically

Add a change event listener to detect content modifications and restart the search
@raclim
Copy link
Collaborator

raclim commented Mar 6, 2025

Since this PR is virtually similar to the one that's linked (besides the additional lines on 526-533), I think we should work with and support the one that's been opened first. Please feel free to open a discussion and provide your thoughts on the changes you've added within #3362.

@raclim raclim closed this Mar 6, 2025
@Jatin24062005
Copy link
Contributor Author

@raclim Sure! Also, I’ve created an issue related to this. It would be great to consider that alongside the discussion in #3362. This way, we can ensure all necessary changes are addressed in a single place.

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.

2 participants