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

[iOS] setCursor is delayed when keyboard is up #1691

Closed
raineorshine opened this issue Jan 16, 2023 · 2 comments · Fixed by #2752
Closed

[iOS] setCursor is delayed when keyboard is up #1691

raineorshine opened this issue Jan 16, 2023 · 2 comments · Fixed by #2752
Assignees
Labels
bug Something isn't working

Comments

@raineorshine
Copy link
Contributor

raineorshine commented Jan 16, 2023

Steps to Reproduce

  1. Create a few thoughts.
  2. Keep the keyboard up.
  3. Move the cursor around by tapping other thoughts.

Current Behavior

There is a delay after touchend before the cursor moves. This delay only exists when the keyboard is up (state.editing).

Expected Behavior

On touchend, the cursor should immediately move.

(On touchstart the cursor cannot move immediately since we have to wait for drag-and-drop.)

@raineorshine raineorshine added the bug Something isn't working label Jan 16, 2023
@raineorshine raineorshine added this to the 🧠 Fluid Sensemaking I milestone Jan 16, 2023
@raineorshine raineorshine changed the title [iOS] setCursor is delayed in edit mode [iOS] setCursor is delayed when keyboard is up Oct 27, 2024
@ethan-james
Copy link
Collaborator

Interestingly, if I tap on the bullet, I get a similar delay as I do when the keyboard is up. If I tap on the thought itself (without creating a browser selection) then I see the selected cursor change very quickly. Can you please confirm that you would like to see this faster transition in the following cases?

  1. Tap on thought, keyboard closed (currently fast)
  2. Tap on bullet, keyboard closed (currently slow)
  3. Tap on thought, keyboard open (currently slow)
  4. Tap on bullet, keyboard open (currently slow, closes keyboard)

@raineorshine
Copy link
Contributor Author

raineorshine commented Dec 24, 2024

Thanks for the question. Yes, we want a fast transition is all cases. When touchend occurs, there is no possibility for long tap or drag-and-drop, so I don't see any reason to delay setCursor. We use fastClick instead of onClick for similar reasons.

Tapping on a thought vs tapping on a bullet involve different event handlers, so I would be cautious about treating them as the same issue. Perhaps they have the same cause, or perhaps they are slightly different. A bullet does not need to worry about preserving the browser selection offset created by the default browser behavior the way that a thought does in edit mode. For troubleshooting purposes, I would act as if they have separate causes until proven otherwise. If troubleshooting them together proves to be too complex, you can try approaching them one at a time. Just my $0.02, but I trust your judgment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants