YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub

YUI 2.x

Ticket #2528930 (closed defect)

Reporter


Satyen Desai
Opened: 05/28/10
Last modified: 09/7/10
Status: closed
Type: defect
Resolution: fixed

Owner


Satyen Desai
Target Release: 3.2.0
Priority: P3 (normal)
Summary: Base.create doesn't isolate ATTRS of extensions passed in
Description:

Base.create doesn't isolate individual ATTRS attribute configs of extensions.

It uses Y.aggregate(r.ATTRS, s.ATTRS, true) under the hood, which sets r.ATTRS[foo] = s.ATTRS[foo] (so the config for foo ends up being shared).

See: http://yuilibrary.com/forum/viewtopic.php?f=18&t=3763&p=13052#p13052

Attaching test case.

Type: defect Observed in Version: 3.1.1
Component: Base Severity: S3 (normal)
Assigned To: Satyen Desai Target Release: 3.2.0
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: N/A
URL:
Test Information:

Attachments

Attachment #1: yui3wp.html (download)

Change History

Satyen Desai

YUI Developer

Posted: 05/28/10

Forgot to mention, the one known area which this currently impacts is WidgetParent.ATTRS.defaultChildType, since the usage expectations is that users of WidgetParent will set defaultChildType { value: "foo" } in their ATTRS definition, but the setter/getter come from the extension.

Satyen Desai

YUI Developer

Posted: 05/28/10
  • resolution changed to fixed
  • status changed from accepted to checkedin

Fixed Base.create to properly isolate ATTRS on extensions. Fixes #2528930
View Commit:

Satyen Desai

YUI Developer

Posted: 06/30/10

Fixed Base.create to properly isolate ATTRS on extensions. Fixes #2528930
View Commit:

George

YUI Developer

Posted: 09/7/10
  • status changed from checkedin to closed