Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dynamic nodes insertion & rendering issue (scrollbar)

8 views
Skip to first unread message

Frycake

unread,
Jan 6, 2010, 8:34:45 AM1/6/10
to
Hi all,

I'm inserting dynamically elements into my xul document with JQuery,
and it's working quite well.
Quite well because if the content is bigger than the container height,
the renderer don't show a scrollbar.

1. I load an iframe with an empty (almost) xul document
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<xul:window id="xulWindow"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/
there.is.only.xul"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
orient="vertical"
xmlns:html='http://www.w3.org/1999/xhtml'
equalsize="never">
</xul:window>

2. I fill the window (of my iframe) with Jquery by appending children
of the root node of my xml document (here an hbox).
$iframeWindow.append($(xml).find(':first > *'));

The xul code (in XML format)
<hbox height="300">
<hbox flex="1" style="overflow:auto">
<vbox height="1000">
<xul:image src="http://ups.imagup.com/06/1261626629.png"
width="63" height="466"></xul:image>
</vbox>
</hbox>
</hbox>

3. Conclusion
If I load the xul document containing the previous xul code directly
in my browser, a scrollbar appears. So I could conclude that the issue
is linked to the dynamic rendering of the inserted elements.

I hope I've been meaningful

Vasu

unread,
Jan 7, 2010, 2:49:29 PM1/7/10
to
Thanks for sharing. Even I was able to get going with the jquery with
some caveats.

If you have created dynamic elements with style overflow, it should
work though.

Frycake

unread,
Jan 12, 2010, 5:37:59 AM1/12/10
to
Hi Vasu,

Thank you for your quick answer.

I just find a solution, effectively "overflow:auto" is well
interpreted by gecko.
But, when you are inserting nodes dynamically into a XUL document,
this attribute has to be wrote in an external CSS file.

0 new messages