Hi Richard,

Thanks for the response.
Here is what what needs to be accomplished:

1.  Through user actions, a dialog will popup
2.  For user convenience, focus is immediately placed in the password
box so that they can automatically start typing in their credentials.
(this part is fine as I just use .focus() on a specific element with a
specific id).
3.  If the user clicks on the overlay for "fun" or by mistake, focus
is now lost from the password box.
4.  So our goal is, if the user clicks on the overlay whether it is
intentional or accidental, we want to place focus back into the
password box so that they don't specifically have to click in there to
start typing.

Another reasoning behind this is that we're moving towards supporting
JAWS 9 which is a screen reader.  So if our password box loses focus
and we don't refocus for them, then the visually impaired may have
issues with navigating back to the password box where they came from.

Also when you say it is by design that focus is returned to the modal
dialog...that potentially could be a problem with screen readers.
Preferably in some cases I'd like to be able to place focus on the
title of the dialog so that the visually impaired might have an idea
that they are inside a popup.  At this point, I guess the same thing
is happening, I am not able to focus directly on the title tag even if
I use the internal variables to target it.

Would any of this be possible to do?  Again we are switching away from
Prototype to jQuery and we would like to continue down the jQuery path
but these 2 features I'm asking about now were both available with
Prototype's window dialog version.

Thanks a bunch!

Shao

On Aug 28, 8:07 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> Can you provide a bit of explanation on what it is you're trying to
> accomplish exactly? The dialog's modal overlay is a managed element, if you
> will. There's no supported (API) way to access it. If you're trying to
> handle some custom mouse/keyboard events on it, you'll likely run into a
> situation where those events are being eaten/canceled and the focus returned
> to the modal dialog, which is by design.
>
> - Richard
>
> Richard D. Worthhttp://rdworth.org/
>
> On Wed, Aug 27, 2008 at 10:03 AM, Shao Kang Tat <[EMAIL PROTECTED]>wrote:
>
>
>
> > Hello all,
>
> > I figured I'd write a simpler question than the one I had yesterday
> > since it was a few questions jammed into one post.
>
> > Basically here is some really simple code:
>
> > <script>
> >        function donkey(){
> >                $("#example").dialog({bgiframe:true, title:"hello there",
> > modal:true});
> >                $($("#example").data("dialog").overlay.$el[0]).bind("click",
> > function(){ alert(0); })
> >        }
> > </script>
>
> > <div id="example" class="dialog">
> >        dialog content goes here
> > </div>
>
> > Note the 2nd line which binds a click event to a function.  This works
> > in FF and Safari but not in IE6.  However if I change the bind to a
> > mouseover, then all is well.  Binding to mousedown doesn't work
> > either, so I can't seem to figure out what it is about the click or
> > mousedown event that doesn't seem to bind properly.
>
> > However, if I alert what the object's onclick or onmousedown is, it
> > tells me it's a function.  So it seems like it knows what it is, but
> > just doesn't execute.
>
> > Whether I do a mind or simply do a :
>
> > $("#example").data("dialog").overlay.$el[0].onclick =  function()
> > { alert(0); }
>
> > the results are the same.  It will work in FF but not IE6.
>
> > Thanks,
> > Shao

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to