-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat(chips): Make chips edittable on demand. #7210
feat(chips): Make chips edittable on demand. #7210
Conversation
this.enableChipEdit = $scope.$parent && $scope.$parent.enableChipEdit == 'true'; | ||
|
||
if(this.enableChipEdit) { | ||
this.$element.on('keydown', this.chipKeyDown.bind(this)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should indent your code with two spaces to be aligned with the other components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I have replaces four spaces into two
this.$element.addClass('md-chip-editing'); | ||
var currentText = this.getContentElement().text(); | ||
this.getContentElement().addClass('ng-hide'); | ||
this.getChipContent().append('<input type="text" value="'+currentText+'" />'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just thought a bit about the input. It's just an idea, can we not use a contend editable div? This will work really good and doesn't need all the text measures. Then we just need to watch for the content editable blur and update the actual chip model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this idea. I have used this approach in the next iteration.
@mertdeg2 Just run it myself, works perfect 👍 |
Thanks Paul! Good catch, I have fixed the second issue. We had a discussion It seemed reasonable to follow gmail's chips implementation like below. On Mon, Feb 22, 2016 at 12:01 PM, Paul Gschwendtner <
|
* use of 'sudo' has negative perf impacts with Travis containers * should use SauceLabs to test with Chrome and other browsers.
As discussed with @topherfangio, we should not take advantage of the `scope()` method, because these will be only available in Angular's debug mode. So we both agreed, with removing that and just compiling the cloned element from service into the given scope. Closes #7252
Media query with \0 causing parsing issues with node-sass and LESS. * Move all IE fixes to raw CSS. Append to generated CSS during builds. Fixes #6304
At the moment we are fixing the height, this will caught issues with the select because it provides the content and a margin of `20px 0 26px`, plus the message which will be shown when the user selects one option. That mean's that won't fit in, and the clickable area will be shrinked. Fixes #6943 Closes #6955
The current description for the autocomplete attribute was really confusing, and the user was wondering why the autocomplete wasn't retrieving focus automatically. But they didn't know about the other behaviour of the actual `md-autofocus` directive. The autocomplete attribute "wrap" is just a little addition which focus the related input instead of the element. Fixes #7283 Closes #7290
This reverts commit a7056cc. # Conflicts: # src/core/services/layout/layout.attributes.scss # src/core/services/layout/layout.scss # Conflicts: # src/core/services/layout/layout.scss
Inherit is not the proper value, 0 should be used instead Closes #6472
Description: closes #2320
Description: Previously I was relying on keydown event to adjust the input width. But that causes some visual disturbances during typing. Now I am relying on input event.
Description: Addressing DevVersion's code review feedback
Description: Addressing DevVersion's code review feedback
Description: Addressing DevVersion's code review feedback
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
1 similar comment
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
@char0n - it was reverted because Chrome fixed in it v48. Are you saying this is STILL an issue with Firefox? If so, then our apologies, we will restore the fix.
|
@ThomasBurleson, sorry I don't know the exact process, I found the commit that caused the issue and commented. Yes I confirm that Chrome v48 fixes the issue, but the issue is still present in FireFox 44.0.2 |
@char0n @ThomasBurleson GitHub automatically shows comments from commits which are attached to the PR (See for example: JonFerrera#1 - referenced by 179dc19) |
@ThomasBurleson Issue created: #7382 @devversion thanks for info. |
Description: closes #2320