Ticket #2531851 (closed defect)
Last modified: 04/17/12
Target Release: 3.5.0
Priority: P3 (normal)
|Summary:||Y.augment(node, Y.Attribute) doesn't fire change events for certain attributes - value is one of them.|
Regression introduced by the AttributeCore refactor combined with Node's use of _stateProxy and Node's custom setters.
a) The Attribute call to `var prevVal = this._getStateVal(attr);` moved from before the setter is called, to after it, as a runtime optimization from the re-factor; Don't need to get prevVal if we
b) Node leverages Attributes _stateProxy support, to store state somewhere other than _state (in this case to map to the dom node).
c) Node's setter for "value" sets the value on the _stateProxy [ build/node-attrs/node-attrs.js ]
As a result, for the `value` attribute, `(newVal === prevVal)` was always true, resulting in the event not firing, since `_getStateVal("value")`, would get the currently stored value from
`set("title", "foo")` for example, works fine.
|Type:||defect||Observed in Version:||3.5.0pr2|
|Assigned To:||Satyen Desai||Target Release:||3.5.0|
|Location:||Library Code||Priority:||P3 (normal)|