Skip to content
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

When using find and replace, the next string is selected, but the previous is replaced #15657

Closed
speleos opened this issue Jan 18, 2024 · 5 comments · Fixed by #15803
Closed

Comments

@speleos
Copy link

speleos commented Jan 18, 2024

Description

When I use find and replace, as one string is replaced, the next occurrence is highlighted.
However, if I press replace again, the previous occurrence is replaced, not the one highlighted.

I've confirmed this issue with a clean install and in incognito mode on chrome.

Reproduce

Open "Find and replace".
Type the string to be found.
Type the replacement string.
Use the up and down buttons to select the first occurrence you want to replace.
Press replace. The string is replaced as expected and the highlight moves to the next occurence.
Press replace again. The highlight moves again, but the replaced occurrence is the one before the first replacement.
This will happen every time I press replace.

image

Expected behavior

The highlighted string is replaced.

Context

  • Operating System and version: Linux Ubuntu 20.04
  • Browser and version: Chrome 120
  • JupyterLab version: 4.0.7
@speleos speleos added the bug label Jan 18, 2024
Copy link

welcome bot commented Jan 18, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Jan 18, 2024
@krassowski krassowski added this to the 4.0.x milestone Jan 18, 2024
@JasonWeill
Copy link
Contributor

#15572 concerns a similar issue when the 'find' string is a substring of the 'replace' string, but this is a different issue. @speleos thanks for opening this!

@krassowski
Copy link
Member

Related to #13968

@JasonWeill
Copy link
Contributor

Reproduced this with Lab 4.1.1.

@JasonWeill
Copy link
Contributor

@krassowski I started working on this issue yesterday afternoon.

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

Successfully merging a pull request may close this issue.

3 participants