Skip to content

Commit

Permalink
Chips: Apply md-readonly class to md-chips-wrap element if read-only
Browse files Browse the repository at this point in the history
Also removes the md-chips class from the md-chips element.  This fixes the issue where `cursor: text` was being applied even when read-only.
  • Loading branch information
pauln committed Jul 26, 2017
1 parent e406d3b commit 39fa3a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion addon/templates/components/paper-chips.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<md-chips-wrap
class="md-chips {{if (and (not readOnly) isFocused) "md-focused"}} {{unless readOnly "md-removable"}}"
class="md-chips {{if (and (not readOnly) isFocused) "md-focused"}} {{unless readOnly "md-removable"}} {{if readOnly "md-readonly"}}"
tabindex="-1"
onkeydown={{action "keyDown"}}
onfocus={{action "chipsFocus"}}
Expand Down
4 changes: 2 additions & 2 deletions addon/templates/components/paper-contact-chips.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<md-chips class="md-chips md-contact-chips {{if (and (not readOnly) isFocused) "md-focused"}}">
<md-chips-wrap class="md-chips md-contact-chips {{if (and (not readOnly) isFocused) "md-focused"}}" tabindex="-1" onkeydown={{action "keyDown"}} onfocus={{action "chipsFocus"}} onblur={{action "chipsBlur"}}>
<md-chips class="md-contact-chips {{if (and (not readOnly) isFocused) "md-focused"}}">
<md-chips-wrap class="md-chips md-contact-chips {{if (and (not readOnly) isFocused) "md-focused"}} {{if readOnly "md-readonly"}}" tabindex="-1" onkeydown={{action "keyDown"}} onfocus={{action "chipsFocus"}} onblur={{action "chipsBlur"}}>
{{#each content as |item index|}}
<md-chip class="md-chip md-default-theme {{if readOnly "md-readonly"}} {{if (eq activeChip index) "md-focused"}}" onclick={{action "chipClick" index}}>
<div class="md-chip-content" tabindex="-1" aria-hidden="true">
Expand Down

0 comments on commit 39fa3a8

Please sign in to comment.