md-chips: Add a chip onInputBlur #3364
Comments
👍 |
3 similar comments
👍 |
👍 |
👍 |
In the meantime, you can still hack :
This is just replicating what is triggered by ENTER keycode, on MdChipsCtrl.prototype.inputKeydown. |
From the best I can tell, this is not explicitly specified in spec, but I would agree with the suggestion of the reporter. |
UX decision: Always add on blur |
Yay! |
+1 |
I'm happy about your UX decision. Our users are having the same issues when filling out forms with chips. |
+1 |
+1 This should be re-opened. I have tried all of the recommended workarounds and some variations of my own and none of them work well with md-autocomplete. |
I reopened that issue and we'll work on an attribute, which allows developers to add chips, on input blur. |
* Allows developers to convert the remaining input text into a new chip on input blur. This is useful for example, when having chips for email addresses. Closes angular#3364.
* Allows developers to convert the remaining input text into a new chip on input blur. This is useful for example, when having chips for email addresses. Closes angular#3364.
* Allows developers to convert the remaining input text into a new chip on input blur. This is useful for example, when having chips for email addresses. Closes #3364.
The md-chips component has now the md-add-on-blur functionality. See angular/material#3364
+1 Thanks for the hack@jdeanwaite, works awesome! |
@jelbourn Thanks, I tried your commit in 1.1.1 and it works great, |
@devversion Very nice to have this functionality, however... Using md-add-on-blur with auto-complete breaks the click functionality for the auto-complete list. Edit: So I was able to fix it by modifying the code to check and see if the auto-complete list item is the new active element. I had to delay it with a 0 second timeout because the blur event fires before the list item becomes the new active element.
It's not as elegant of a solution as I would like, but it works... |
+1 |
Did not have time to check it yet, but hasn't this been addressed in 1.1.1 ? |
+1 |
I think it's a good experience for md-chips to convert outstanding text to a chip when input loses focus.
Here is a use-case when it's relevant. User does not know that he needs to click enter to add a chip. When users clicks "Send email", no email has been captured.
The text was updated successfully, but these errors were encountered: