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

mdIcon in mdListItem gets not wrapped with a button when mdListItem does not have a ngClick #3928

Closed
JuHwon opened this issue Jul 28, 2015 · 2 comments
Assignees
Labels
pr: merge ready This PR is ready for a caretaker to review type: bug ux: integration
Milestone

Comments

@JuHwon
Copy link

JuHwon commented Jul 28, 2015

If you build a mdListItem without a ng-click attribute the containing mdIcons with a ng-click attribute will not be wrapped with a md-button element. I think this is a strange behaviour.

  <md-list-item ng-repeat="person in people">
    <p>{{ person.name }}</p>
    <md-icon md-svg-icon="communication:messenger" ng-click="doSecondaryAction($event)" aria-label="Open Chat" class="md-secondary md-hue-3" ng-class="{'md-primary': person.newMessage}"></md-icon>
  </md-list-item>

I would blame the if statement at line 80 in the list.js

Here is a codepen example.

@marcysutton
Copy link
Contributor

Yep, that's a bug. That icon needs to be made into a button to be actionable.

@JuHwon JuHwon changed the title mdListItem icon wont wrapped with button without ngClick on the mdListItem mdListItem icon gets not wrapped with a button without ngClick on the mdListItem Jul 29, 2015
@JuHwon JuHwon changed the title mdListItem icon gets not wrapped with a button without ngClick on the mdListItem mdListItem icon gets not wrapped with a button when mdListItem does not have a ngClick Jul 29, 2015
@JuHwon JuHwon changed the title mdListItem icon gets not wrapped with a button when mdListItem does not have a ngClick mdIcon in mdListItem gets not wrapped with a button when mdListItem does not have a ngClick Jul 29, 2015
@ThomasBurleson ThomasBurleson modified the milestone: REVISIT Jul 31, 2015
@ThomasBurleson ThomasBurleson modified the milestones: REVISIT, Backlog Aug 10, 2015
@gligoran
Copy link

+1 and don't limit it to ngClick. ngHref, href, and probably some others would be welcome additions.

@ThomasBurleson ThomasBurleson modified the milestones: Backlog, 0.12.0 Sep 2, 2015
@topherfangio topherfangio modified the milestones: 0.12, 0.13 Oct 15, 2015
@ThomasBurleson ThomasBurleson modified the milestones: 1.0-rc2, 1.0-rc3 Oct 30, 2015
@topherfangio topherfangio modified the milestones: 1.0-rc4, 1.0-rc3 Nov 3, 2015
@ThomasBurleson ThomasBurleson removed this from the 1.0-rc4 milestone Nov 16, 2015
@ThomasBurleson ThomasBurleson modified the milestones: 1.0-rc5, 1.0-rc4 Nov 16, 2015
@topherfangio topherfangio modified the milestones: 1.0-rc7, 1.0-rc5 Nov 23, 2015
@ThomasBurleson ThomasBurleson modified the milestones: 1.0-rc7, 1.0-rc6 Nov 25, 2015
EladBezalel added a commit that referenced this issue Nov 30, 2015
Secondary was being wrapped only if `md-checkbox` or `md-switch` were near by or `ng-click` was applied on the list item.

fixes #3928
@EladBezalel EladBezalel added the pr: merge ready This PR is ready for a caretaker to review label Nov 30, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr: merge ready This PR is ready for a caretaker to review type: bug ux: integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants