Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Conversation

devversion
Copy link
Member

  • Currently we check the truthyness of the chipBuffer, to confirm that the user is at the beginning of the chip input.
    Once he is at the beginning, we select and focus the previous chip, so the user can keep deleting the chips.
  • Checking for truthyness is not working, because Angular is trimming all ngModel values for the autocomplete and default chip input.
    This caused issues, where users can't delete their spaces in the input anymore.

Checking the cursor position is more appropriated here, and works without affecting the autocomplete.
This allows the autocomplete to work independently without any changes with the md-chips component.

Tested with Chrome, Firefox and IE.

(Would be cool to test with #8752)

Fixes #8750

* Currently we check the truthyness of the chipBuffer, to confirm that the user is at the beginning of the chip input.
  Once he is at the beginning, we select and focus the previous chip, so the user can keep deleting the chips.

* Checking for truthyness is not working, because Angular is trimming all ngModel values for the autocomplete and default chip input.
  This caused issues, where users can't delete their spaces in the input anymore.

Checking the cursor position is more appropriated here, and works without affecting the autocomplete.
This allows the autocomplete to work independently without any changes with the `md-chips` component.

Fixes angular#8750
@devversion devversion added the needs: review This PR is waiting on review from the team label Jun 17, 2016
@ThomasBurleson ThomasBurleson added pr: merge ready This PR is ready for a caretaker to review and removed needs: review This PR is waiting on review from the team labels Jun 18, 2016
@devversion devversion deleted the fix/chips-trim-bug branch June 18, 2016 15:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr: merge ready This PR is ready for a caretaker to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants