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

Commit

Permalink
fix(chips): cursor style on static chips
Browse files Browse the repository at this point in the history
Do not set the cursor style on the md-chips element if there are only static chips.
Also remove some TODO docs that have already been done.

fixes #3253. closes #4114.
  • Loading branch information
Ty Potter authored and ThomasBurleson committed Aug 13, 2015
1 parent 565b7b4 commit 6726eca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/components/chips/chips.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ $contact-chip-name-width: rem(12) !default;
font-size: $chip-font-size;
padding: $chip-wrap-padding;
vertical-align: middle;
cursor: text;

&:not('.md-readonly') {
cursor: text;
}
.md-chip {
cursor: default;
border-radius: $chip-height / 2;
Expand Down
7 changes: 1 addition & 6 deletions src/components/chips/js/chipsDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@
* <li>Colours for hover, press states (ripple?).</li>
* </ul>
*
* <ul>List Manipulation
* <li>delete item via DEL or backspace keys when selected</li>
* </ul>
*
* <ul>Validation
* <li>de-dupe values (or support duplicates, but fix the ng-repeat duplicate key issue)</li>
* <li>allow a validation callback</li>
* <li>hilighting style for invalid chips</li>
* </ul>
Expand Down Expand Up @@ -92,7 +87,7 @@
<md-chips-wrap\
ng-if="!$mdChipsCtrl.readonly || $mdChipsCtrl.items.length > 0"\
ng-keydown="$mdChipsCtrl.chipKeydown($event)"\
ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus() }"\
ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus(), \'md-readonly\': !$mdChipsCtrl.ngModelCtrl }"\
class="md-chips">\
<md-chip ng-repeat="$chip in $mdChipsCtrl.items"\
index="{{$index}}"\
Expand Down

0 comments on commit 6726eca

Please sign in to comment.