Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

IE11: button type with interpolated value is ignored #14117

Closed
@cudasteve

Description

@cudasteve
  • Do you want to request a feature or report a bug?

Bug (with workaround). Though I couldn't find any info on this behavior on the internet and it seems like it'd be an important "gotcha" for a lot of people that should really be documented somewhere.

  • What is the current behavior?

Using <button type="{{someInterpolatedThing}}"> doesn't seem to play nicely with IE11 (didn't test past versions). It sets the type to submit regardless of what the interpolated value comes out to.

  • Steps to reproduce and if possible a minimal demo of the problem

Here's a pen showing the behavior. Open in Chrome, you get button type of button. Open in IE11, you get button type of submit.

Workaround: Using ng-attr-type="{{someInterpolatedThing}}" fixes it. I guess if this is the only way to workaround it, it might be useful having this as an additional example in the ngAttr docs since the canonical one there right now is <circle cx> which makes it seem like it might be primarily for svg.

  • What is the expected behavior?

IE11 interpolates the value and sets the type of the button

  • What is the motivation / use case for changing the behavior?

Cross-browser consistency (if possible) or at least let people know about it in the docs (if not possible)

  • Which version of Angular, and which browser and OS does this issue affect? Did this work in previous
    versions of Angular? Please also test with the latest stable ánd snapshot versions.

1.5.0 on IE11

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions