View Full Version : BasicDialog inside nested BorderLayout

6 Nov 2006, 6:44 PM
using BasicDialog inside a nested BorderLayout, I seem to have containment issues.

see problem here
*first click any album, then a song title in "Tracks" list.

BasicDialog is clipped.

is this due to a position: relative of container hold BasicDialog?

if I place the BasicDialog xhtml outside the BorderLayout, there's no problem, but that's not a good long-term solution.

(damn, I placed this in the wrong forum, sorry)

6 Nov 2006, 6:51 PM
You always want to render the dialog to the body element.

6 Nov 2006, 7:22 PM
of course. I shoulda' known that.

// first append dialog xhtml to document.body
var dialogEl = getEl('my-nested-dialog');

// then build the BasicDialog
this.TrackViewer = new YAHOO.ext.BasicDialog('my-nested-dialog', {
draggable: true,

A donation from my company is forthcoming.

6 Nov 2006, 7:24 PM
In the latest version:


There are ton of new dom manipulation functions.

11 Nov 2006, 3:39 PM
Just a suggestion, because this one caught me too. Why not add a constructor option (default true) that moves the dialog's element to the body?

BTW another symptom (besides clipping) is that the dialog shadow actually covers the dialog itself if you don't render to the body.

11 Nov 2006, 11:10 PM
I've mentioned something like this before, but perhaps there should be "relative modality".

That is you can render into any element, and the render code, creates the mask div in that container.

It's probably because the mask is being rendered into the document.body, that it's making out dialogs that you render into other containers.

I've just checked Dojo, and their "window" widgets that are modal, are only modal in a certain area... relative modality.

They're also maximizable within that area (but not very well - they don't use Jack's Element class to do precise enough sizing).

Minimizable should be possible with the requested dialog lookup facility that we discussed in another thread.

21 May 2007, 10:43 AM
"That is you can render into any element" ...

Right now I'm just doing the required RTFM (Greets to the group) but this is what I'm going to be asking about: I have my complex layout working but rather than following my design (which requires that a link in area A open area Z and display data M there ... or B and X for N) I'm just doing whatever my limited knowledge allows me. Which, cuz EXTJZ rocks steady, if actually really nice. But at the moment I'm being lead by the nose rather than coding intentionally!

cheers to all

*corrected typo*

Dav Evans
11 Sep 2007, 5:10 PM
when calling...


will this remove 'my-nested-dialog' from its current position in the DOM when it appends it to the body, or is it just copying it. If it only copies it, what is the best way to move an element under the body all together?


11 Sep 2007, 11:41 PM
It will move it. To create a copy, you would have to call cloneNode: http://www.w3.org/TR/DOM-Level-2-Core/ecma-script-binding.html