Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#18860 closed defect (invalid)

dojo controls appearance issue in iframe in a widget based structure

Reported by: gunjan@… Owned by:
Priority: undecided Milestone: tbd
Component: HTML Version: 1.10.2
Keywords: Cc:
Blocked By: Blocking:

Description

dijit.form.textbox in widget based structure is appearing as single vertical line in iframe,means its width is reducing to zero.

dijit.form.button is also appearing as two lines in iframe.

Change History (6)

comment:1 Changed 3 years ago by dylan

Status: newpending

Sounds like a missing theme file or missing scripts or an incorrect reference to the DOM. Either way we would need to see a testcase (create one on JSFiddle) to reproduce.

comment:2 Changed 3 years ago by gunjan@…

Status: pendingnew

created a JSFiddle http://jsfiddle.net/7u8fh3vj/,

This is being called in one javascript file dynamically and put inside a floating pane on main page default.htm .

comment:3 Changed 3 years ago by gunjan@…

after that the complete thing is embedded in iframe.

comment:4 Changed 3 years ago by dylan

Resolution: invalid
Status: newclosed

Your example uses very outdated approaches to Dojo, basically pre-AMD style which was last used around 2011. While it still works, you should really take the time to learn more modern approaches to using Dojo and the Esri APIs.

When DOM nodes are created, they belong to a specific document. The HTML DOM does not allow you to simply move already constructed nodes to a different document. You have to create the DOM nodes in the document in which they will be rendered.

I don't view this as a bug with Dojo as it is not a bug. I view this as a support question, so please ask via the support options listed on https://dojotoolkit.org/community/ .

comment:5 Changed 3 years ago by gunjan@…

actually we are working on support project and this code was written some years back and we cannot change the complete code now.can you please elaborate below lines by example

"When DOM nodes are created, they belong to a specific document. The HTML DOM does not allow you to simply move already constructed nodes to a different document. You have to create the DOM nodes in the document in which they will be rendered."

comment:6 in reply to:  5 Changed 3 years ago by dylan

Replying to gunjan@…:

actually we are working on support project and this code was written some years back and we cannot change the complete code now.can you please elaborate below lines by example

"When DOM nodes are created, they belong to a specific document. The HTML DOM does not allow you to simply move already constructed nodes to a different document. You have to create the DOM nodes in the document in which they will be rendered."

You said you are creating a widget, and then embedding it in an iframe after it is created. It is not valid to move DOM nodes across document objects like this (e.g. from the main window into an iframe). Anyway, please move the discussion to the mailing list... we keep the bug system for bugs and I don't believe this is a bug.

Note: See TracTickets for help on using tickets.