Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was 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

Description

@JuHwon

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.

Activity

  1. marcysutton commented on Jul 28, 2015

    @marcysutton
    Contributor

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

  2. 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[/+] on Jul 29, 2015
  3. 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[/+] on Jul 29, 2015
  4. 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[/+] on Jul 29, 2015
  5. modified the milestone: on Jul 31, 2015
  6. modified the milestones: , on Aug 10, 2015
  7. gligoran commented on Aug 27, 2015

    @gligoran

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

  8. removed this from the milestone on Sep 2, 2015
  9. 18 remaining items

  10. modified the milestones: 1.0-rc7, 1.0-rc5 on Nov 23, 2015
  11. added a commit that references this issue on Nov 30, 2015
    1394935
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions