Opened 5 years ago

Closed 5 years ago

#18075 closed defect (invalid)

dojo.withGlobal bugs when creating widget.

Reported by: jb365 Owned by: jb365
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.9.3
Keywords: Cc:
Blocked By: Blocking:

Description

If I want to use dojo.withGlobal to create a widget for example a dialog in another window, the dialog will still be created in the original window.

The root cause is in _WidgetBase.js::create function

this.ownerDocument = this.ownerDocument
(this.srcNodeRef?this.srcNodeRef.ownerDocument : document);

Widget use the original document by default, no matter I changed the scope before.

Change History (2)

comment:1 Changed 5 years ago by bill

Owner: set to jb365
Status: newpending

Assuming it's true that dojo.withGlobal() doesn't work (for creating widgets), can't you just specify ownerDocument as a parameter to the widget constructor?

new Button({ownerDocument: myDoc})

comment:2 Changed 5 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.