blueprint
blueprint copied to clipboard
[MultiSelect2 / TagInput] Deleting tags is performed in the wrong order after deleting
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
Steps to reproduce
- Create an app using
tagInput
orMultiSelect
- Add one or multiple tags
- Delete all
- Add tags agains
- 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 :
https://user-images.githubusercontent.com/9548473/177285272-56e1b317-1229-4603-a666-63290ead1649.mov
Expected behavior
Delete operation always start from the tag closest to the cursor by default.
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.
i'm quite busy at the moment but if i could i take a look into this issue