Skip to content

Duplicate id's on md-input #320

@matthewdenobrega

Description

@matthewdenobrega

Note: for support questions, please use one of these channels:
https://github.com/angular/material2/blob/master/CONTRIBUTING.md#question.
This repository's issues are reserved for feature requests and bug reports.

  • Do you want to request a feature or report a bug?
    Report a bug
  • What is the current behavior?
    The id attribute of an md-input is copied onto the inner input element, which results in duplicate id's on the page.
  • If the current behavior is a bug,
    please provide steps to reproduce and if possible a minimal demo of the problem

    via https://plnkr.co or similar.
  • What is the expected behavior?
    This is as per the design document - 'The id will be transferred to the native input element.' - however because the original element also has the id, this results in duplicate id's on the page. The internal input id should be modified to avoid this.
  • What is the motivation / use case for changing the behavior?
    Current behavior is not compliant with the HTML spec
  • Which version of Angular and Material, and which browser and OS does this issue affect?
    Did this work in previous versions of Angular / Material?
    Please also test with the latest stable and snapshot versions.
    Tested on 2.0.0.alpha-2 in Chrome
  • Other information
    (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix)
    I've sketched a possible solution in fix(input): prefix copied input id #321

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2The issue is important to a large percentage of users, with a workaround

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions