[EuiComboBox] Only delete the last selected pill when pressing the backspace key when the input caret is present#6699
Conversation
- it should be firing only on the input, and not (e.g.) on the clear button or on individual pills
+ fix `data-test-subj` that was causing an extra space and a failed selector get
|
@1Copenut Probably out of scope for this PR, but I noticed that pressing "Enter" on the pill X buttons and the clear X buttons doesn't work (but space does...) which I find incredibly annoying (normally both enter and space work for all buttons). Is this something we should resolve in a separate PR, you think? |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6699/ |
I agree with you the |
1Copenut
left a comment
There was a problem hiding this comment.
💯 This was a fun feature to test. I ran it through Safari + VO and Chrome and Firefox + NVDA. VO doesn't do the best job announcing the listbox items (not new) but it announced the newly selected item and updated the backspace to delete text perfectly. NVDA was an even better experience.
Good to go. Thank you @cee-chen !
EUI `77.0.0` ➡️ `77.1.1` ## [`77.1.0`](https://github.com/elastic/eui/tree/v77.1.0) - Updated `EuiDatePicker` to display a warning icon and correctly set `aria-invalid` when `isInvalid` is passed ([#6677](elastic/eui#6677)) - Updated `EuiFilePicker` to display an alert icon when `isInvalid` ([#6678](elastic/eui#6678)) - Updated `EuiTextArea` to display an alert icon when `isInvalid` ([#6679](elastic/eui#6679)) - Updated `EuiTextArea` to support the `isLoading` prop ([#6679](elastic/eui#6679)) - Updated `EuiComboBox` to display a warning icon and correctly set `aria-invalid` when `isInvalid` is passed ([#6680](elastic/eui#6680)) **Bug fixes** - Fixed `EuiAccordion` to not set an `aria-expanded` attribute on non-interactive `buttonElement`s ([#6694](elastic/eui#6694)) - Fixed an `EuiPopoverFooter` bug causing nested popovers within popovers (note: not a recommended use-case) to unintentionally override its panel padding size inherited from context ([#6698](elastic/eui#6698)) - Fixed `EuiComboBox` to only delete the last selected item on backspace if the input caret is present ([#6699](elastic/eui#6699)) --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Jon <jon@elastic.co>
Summary
closes #590
What this PR does:
backspacekeypresses on theclearbutton from triggering the last pill deletionbackspacekeypresses on when other pills are focused from triggering the last pill deletionWhat this PR does not do:
backspacekeypresses on pills to delete the pill that's currently focused (I agree with @1Copenut who mentioned in a meeting that that behavior felt unintuitive, and would require extra SR instructions to tell people it's even an option. We can potentially revisit this in the future if it becomes a feature request, but I don't see it as necessary for now)QA
General checklist
**jest andcypress tests**