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

Chips / mdChips (with autocomplete): Keyboard selection broken #4140

Closed
r0b- opened this issue Aug 13, 2015 · 13 comments
Closed

Chips / mdChips (with autocomplete): Keyboard selection broken #4140

r0b- opened this issue Aug 13, 2015 · 13 comments
Assignees
Labels
needs: review This PR is waiting on review from the team
Milestone

Comments

@r0b-
Copy link

r0b- commented Aug 13, 2015

With v0.10.1 selecting an option by keyboard creates an empty chip.
(see Demo with Vegetable Options)

@r0b- r0b- changed the title Chips: Keyboard selction Chip (with autocomplete): Keyboard selection broken Aug 13, 2015
@PseudoCorps
Copy link

Same problem, I cried a little when I noticed this :'(

@r0b- r0b- changed the title Chip (with autocomplete): Keyboard selection broken mdChips (with autocomplete): Keyboard selection broken Aug 16, 2015
@r0b- r0b- changed the title mdChips (with autocomplete): Keyboard selection broken Chips / mdChips (with autocomplete): Keyboard selection broken Aug 16, 2015
@r0b-
Copy link
Author

r0b- commented Aug 16, 2015

Same as #3833

@ThomasBurleson ThomasBurleson modified the milestone: 0.12.0 Sep 2, 2015
@topherfangio
Copy link
Contributor

This should be fixed in master. Can you please test again and verify that it's working for you?

@PseudoCorps
Copy link

Does https://material.angularjs.org/latest/#/demo/material.components.chips run from master? It looks like its still broken there.

@PseudoCorps
Copy link

Almost there

screen shot 2015-09-03 at 7 32 19 pm

screen shot 2015-09-03 at 7 32 35 pm

screen shot 2015-09-03 at 7 32 43 pm

Looks like the style changed a lot

@topherfangio
Copy link
Contributor

@PseudoCorps Can you please test against https://material.angularjs.org/HEAD/#/demo/material.components.chips? That is the actual latest master code; the "latest" tag in the URL is actually the latest official release.

@topherfangio topherfangio added the needs: feedback The issue creator or community need to respond to questions in this issue label Sep 4, 2015
@r0b-
Copy link
Author

r0b- commented Sep 12, 2015

The master version doesn't work for me (neither 0.11.0) :-(
Additionally the custom item template is not compiled anymore....

EDIT:
Solved the compile issue - the md-items attribute expression needs to start with "item in" (and according to that the item variable needs to be "item") ... didn't know that this seems fixed/hardcoded now oO
The additional empty chip still gets added

@topherfangio
Copy link
Contributor

@r0b- I think the item is indeed hard-coded at the moment. I'll take a look and see if we can fix it easily. If not, we'll definitely update the docs to make mention of it.

Regarding the additional empty chip issue, I cannot reproduce. Based on the images by @PseudoCorps, it doesn't look like he is using one of the demos on the site. Can one of you provide a Codepen showing the issue so that we can track it down?

@PseudoCorps
Copy link

Tested again (md website version) and it looks like it works, but I wasn't sure if this is default behavior?

screen shot 2015-09-14 at 11 45 23 am

Scroll

screen shot 2015-09-14 at 11 45 43 am

@topherfangio
Copy link
Contributor

@PseudoCorps Wasn't sure if what is the default behavior?

@PseudoCorps
Copy link

The option box being blank / moving when you scroll

@r0b-
Copy link
Author

r0b- commented Sep 15, 2015

The blank chip is added if the attribute md-require-match is false / missing.
I don't see any documentation about it so this seems to be mandatory?

http://codepen.io/anon/pen/LpGmZK?editors=101

@topherfangio topherfangio added needs: review This PR is waiting on review from the team and removed needs: feedback The issue creator or community need to respond to questions in this issue labels Sep 16, 2015
@topherfangio
Copy link
Contributor

@PseudoCorps I just opened a new issue for the dropdown being blank: #4665

@r0b- I have also created a new issue for the hard coding of item: #4667.

@r0b- md-require-match is not mandatory, but if you don't use it, you must use the md-on-append attribute which is mandatory, but not very well documented. I have opened a new issue about the docs: #4666.

As it says, there are a few open PRs that will help make all of this functionality work better. Particularly, you should be able to return null from md-on-append to not add a chip, but this isn't currently available, so this is why you are getting the blank chip.

I'm going to go ahead and close this issue in favor of the other three. If you have more comments, please post them on one of these new issues or submit a new one (if it isn't covered by those).

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: review This PR is waiting on review from the team
Projects
None yet
Development

No branches or pull requests

4 participants