Ticket #2529751 (accepted defect)

Reporter


Joseph Chiang
Opened: 01/6/11
Last modified: 09/19/12
Status: accepted
Type: defect

Owner


Dav Glass
Target Release: BACKLOG
Priority: P3 (normal)
Summary: callback in parent.opener.YUI().use will be set to null.
Description:

I use YUI 3.3.0pr3 to make cross window/domain communication.
In page A (a.com), user clicks login link it use window.open() to show page B (b.com).
After validation, page B creates an iframe (a.com) as proxy to execute parent.opener.YUI().use("node", callback).
All IE versions failed to to execute the callback, but other browsers does work well.

Demo :
http://josephj.com/lab/yui3-opener-proxy-bug/open.html

After checking the latest code, I find the callback will be set to null because it's not a function but an object.
I can solve my trouble as following:
$ diff yui-debug.js yui-debug-fix.js
614c614
< if (Y.Lang.isFunction(callback)) {
---
> if (Y.Lang.isFunction(callback) || Y.Lang.isObject(callback)) {
Not sure if this is the correct way to do.

The okay demo:
http://josephj.com/lab/yui3-opener-proxy-bug/open-fix.html

Type: defect Observed in Version: 3.3.0 PR3
Component: YUI Global Object Severity: S3 (normal)
Assigned To: Dav Glass Target Release: BACKLOG
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: IE - All
URL: http://josephj.com/lab/yui3-opener-proxy-bug/open.html
Test Information:

Change History

George

YUI Developer

Posted: 04/20/11

Dav Glass

Posted: 04/26/11
  • location changed to Library Code
  • milestone changed to 3.NEXT
  • priority changed to P3 (normal)
  • status changed from assigned to accepted

Jenny Donnelly

YUI Developer

Posted: 09/19/12
  • milestone changed from 3.NEXT to BACKLOG

Moving from 3.NEXT to BACKLOG.