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.

ng-attr vs attribute is different in FF #7051

Closed
@jbedard

Description

@jbedard

I have an input where I want the default size to be 1 until the ng-attr-size is calculated.

    <input size="1" ng-attr-size="{{calculatedSize}}" />

In most browsers the Element.attributes seems to be in the order that the attributes are specified in the DOM. In FF the Element.attributes order does not seem to reflect the DOM order.

ng-attr copies ng-attr-name values into the $attrs under the "name" so they will be evaluated on the first digest, but in FF the size="1" overrides the ng-attr-size so the ng-attr expression never gets evaluated.

Is this expected? Maybe an error/warning logged when an attribute overrides another would be the best solution?

Here's a simple example that is different in FF vs chrome/ie (the example uses value instead of size): http://jsfiddle.net/ZNPPH/2/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions