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

Focus moved to editor from search field on second search input #2613

Closed
rezzap opened this issue Jan 30, 2021 · 3 comments · Fixed by #2531
Closed

Focus moved to editor from search field on second search input #2613

rezzap opened this issue Jan 30, 2021 · 3 comments · Fixed by #2531
Labels
bug Something isn't working NewMember
Milestone

Comments

@rezzap
Copy link

rezzap commented Jan 30, 2021

Expected

I'd expect the cursor to stay in the search field when doing a search on the web app.

Observed

When returning to the search field after doing an initial search, the cursor jumps to the first match of the first character typed and you end up editing the note in the editor instead of writing in the note field.

Reproduced

  1. Go to Simplenote in Chrome on the web app.
  2. Click on CMD+F or CTLR+F to focus on the search field.
  3. Go through the search results.
  4. Go back to the search field using CMD+F or CTLR+F and try searching for something different.
  5. Notice after the first letter your type the cursor jumps to the note editor field and this takes over from the search field input.

Sounds related to this: #2530

Screen recording of the issue is available in the ticket, I was also able to reproduce consistently if help is needed to replicate this.

Where did you see the bug

  • System Make: MacBook Pro
  • System Model: 13-inch 2019
  • OS: macOS
  • OS version: 10.15.7
  • Browser (if applicable): Chrome
  • Browser version (if applicable): Version 88.0.4324.96 (Official Build) (x86_64)
  • Simplenote app version: 2.5.1-Beta1

User reported on Windows 10 in Chrome also.
3686980-zen

@rezzap rezzap added the bug Something isn't working label Jan 30, 2021
@codebykat
Copy link
Member

Huh. I can't reproduce this, but it sounds like the same issue as #2530. We're probably going to make some improvements to focus tracking in the upcoming version as part of #2599, but I'll leave this open so we can test it further.

@codebykat
Copy link
Member

Actually, @rezzap, if you pause for a few seconds after refocusing the search, does it fix the issue? The one that I've seen is a loading condition (the editor loads a bit more slowly than the search field / rest of the app, and requests focus when it loads, so it can be the case that it asks to be focused a second or two after the search field is loaded). This might also happen on switching notes, though I've only been able to reproduce it on a fresh reload.

@rezzap
Copy link
Author

rezzap commented Feb 2, 2021

@codebykat It doesn't make a difference whether I wait or not. I don't know if it makes any difference, but I go through the search results using CMD+G and then use CMD+F to go back to the search field. I tried waiting a few minutes before typing at all or after just typing the first character.

@codebykat codebykat added this to the 2.7.0 milestone Feb 3, 2021
@codebykat codebykat modified the milestones: 2.7.0 ❄️, 2.8.0 Feb 18, 2021
@codebykat codebykat modified the milestones: 2.8.0, 2.9.0 Mar 10, 2021
@sandymcfadden sandymcfadden modified the milestones: 2.9.0, 2.10.0 Mar 20, 2021
@sandymcfadden sandymcfadden modified the milestones: 2.10.0, 2.11.0 Apr 18, 2021
sandymcfadden pushed a commit that referenced this issue May 1, 2021
Fixes #2530

This one is a bit hard to reproduce as it's a race condition, but it happens fairly frequently to me on local dev.

Also Fixes #2613

If you search for a term and toggle through the results and then search again the focus is brought to the editor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working NewMember
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants