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

[MultiSelect2 / TagInput] Deleting tags is performed in the wrong order after deleting #5412

Open
LoiKos opened this issue Jul 5, 2022 · 2 comments

Comments

@LoiKos
Copy link

LoiKos commented Jul 5, 2022

Environment

  • Package version(s): @blueprintjs/core v4.5.1
  • Operating System: macOS Monterey
  • Browser name and version: Google chrome 103.0.5060.53 (Build officiel) (x86_64),

Code Sandbox

Example

Steps to reproduce

  1. Create an app using tagInput or MultiSelect
  2. Add one or multiple tags
  3. Delete all
  4. Add tags agains
  5. Delete them (should goes in the wrong order)

Actual behavior

Using keyboard Backspace, after deleting all existing tags in a tagInput, when you try to add new one, the first added take "focus" or become active, and if you have more tags after it still this tag that will be delete first. You can still use keyboard "left" and "right" to change active tag.

Here is a short video :

Enregistrement.de.l.ecran.2022-07-05.a.10.29.20.mov

Expected behavior

Delete operation always start from the tag closest to the cursor by default.

@adidahiya
Copy link
Contributor

Delete operation always start from the tag closest to the cursor by default.

I agree with this, but at least in this situation the tag being focussed and deleted (the first one) is visually highlighted with a focus ring. So the behavior is somewhat surprising, but not entirely so. Open to PRs to fix.

@LoiKos
Copy link
Author

LoiKos commented Jul 7, 2022

i'm quite busy at the moment but if i could i take a look into this issue

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

No branches or pull requests

2 participants