Uploaded image for project: 'PUBLIC - Liferay Alloy UI'
  1. PUBLIC - Liferay Alloy UI
  2. AUI-101

.attr method is unreliable for setting properties

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.1
    • Component/s: JavaScript
    • Labels:
      None

      Description

      The .attr method is currently unreliable for setting attributes. The reason is because it will only set the expando on a node, but it actually needs to only set the expando if the property is in the DOM object.
      However it should always call setAttribute at the end.

      So the logic should be something like:

      if(property in node.getDOM()){
      node.set(property, value);
      }

      node.setAttribute(property, value);

        Attachments

          Activity

            People

            Assignee:
            nathan.cavanaugh Nate Cavanaugh
            Reporter:
            nathan.cavanaugh Nate Cavanaugh
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              11 years, 14 weeks, 4 days ago

                Packages

                Version Package
                1.0.1