<p>I have a <code>modal dialog</code> form which has some "help links" within it which should open other non-modal panels or dialogs on top of it (while keeping the main dialog otherwise modal).  </p>

<p>However, these always end up behind the mask.  <code>YUI</code> seems to be recognizing the highest <code>z-index</code> out there and setting the mask and modal dialog to be higher than that.</p>

<p>If i wait to panel-ize the help content, then i can set those to have a higher z-index.  So far, so good.  The problem then is that fields within the secondary, non-modal dialogs are unfocusable.  The modal dialog beneath them seems to somehow be preventing the focus from going to anything not in the initial, modal dialog.</p>

<p>It would also be acceptable if i could do this "dialog group modality" with jQuery, if YUI simply won't allow this.</p>

<p>Help!</p>

[{'answer_id': 81688, 'author': 'Hank Gay', 'author_id': 4203, 'author_profile': 'https://Stackoverflow.com/users/4203', 'pm_score': 0, 'selected': False, 'text': "<p>The original dialog can't be modal if the user is supposed to interact with other elements—that's the definition of modal. Does the original dialog <em>really</em> need to be modal at all? If so, have you tried toggling the modal property of the original dialog before you open the other elements?</p>\n"}, {'answer_id': 162315, 'author': 'Bialecki', 'author_id': 2484, 'author_profile': 'https://Stackoverflow.com/users/2484', 'pm_score': 3, 'selected': True, 'text': '<p>By default, YUI manages the z-index of anything that extends YAHOO.widget.Overlay and uses an overlay panel.  It does this through the YAHOO.widget.Overlay\'s "bringToTop" method.  You can turn this off by simply changing the "bringToTop" method to be an empty function:</p>\n\n<pre><code>YAHOO.widget.Overlay.prototype.bringToTop = function() { };\n</code></pre>\n\n<p>That code would turn it off for good and you could just put this at the bottom of the container.js file.  I find that approach to be a little bit too much of a sledge hammer approach, so we extend the YUI classes and after calling "super.constuctor" write:</p>\n\n<pre><code>this.bringToTop = function() { };\n</code></pre>\n\n<p>If you do this, you are essentially telling YUI that you will manage the z-indices of your elements yourself.  That\'s probably fine, but something to consider before doing it.</p>\n'}]
['https://Stackoverflow.com/questions/77287', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8131/']