Ticket #2531851 (closed defect)
Reporter Satyen Desai |
Opened: 03/6/12 Last modified: 04/17/12 Status: closed Type: defect Resolution: fixed |
Owner Satyen Desai |
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. | ||
| Description: | 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 |
| Component: | Attribute | Severity: | S3 (normal) |
| Assigned To: | Satyen Desai | Target Release: | 3.5.0 |
| Location: | Library Code | Priority: | P3 (normal) |
| Tags: | Relates To: | ||
| Browsers: | N/A | ||
| URL: | |||
| Test Information: | |||
Fixed regression - Y.augment(node, Y.Attribute) not firing valueChange events. Fixes #2531851
View Commit: 3f06abe9e62a6f13d506c568f6f40017cb856df9