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

Right arrow doesn't consistently complete a tag suggestion #1854

Closed
qualitymanifest opened this issue Jan 23, 2020 · 0 comments · Fixed by #2350
Closed

Right arrow doesn't consistently complete a tag suggestion #1854

qualitymanifest opened this issue Jan 23, 2020 · 0 comments · Fixed by #2350
Labels
bug Something isn't working

Comments

@qualitymanifest
Copy link
Contributor

qualitymanifest commented Jan 23, 2020

Found this while working on #1853
If you are typing a tag for which there is a suggestion, pressing right arrow doesn't usually work to complete it.

Expected

Pressing right arrow should complete a tag suggestion

Observed

The only way it works is if you "back up" the cursor a character or two, then hit right arrow repeatedly as fast as you can.

Reproduced

  1. Type out a few characters of a tag that you already use somewhere so that a suggestion pops up
  2. Tap the right arrow button. The tag does not complete.
  3. Left arrow back a few characters
  4. Full speed ahead with the right arrow. Usually you can get it to complete

I believe the issue is in tag-input's interceptRightArrow handler. caretPosition should never equal value.length since value.length is 1-offset and caretPosition is 0-offset. I'm guessing the reason why it works when you press right arrow really fast is that something funky is happening with the cursor position state and it hasn't had time to correct itself.

Make Model OS Version App Version
Asus Zenbook Linux Mint 19 Current dev branch... App says 1.12.0 but I think it's 1.14.0?
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.

1 participant