>I have a DIV. This DIV does not always contains a form. But, once this DIV is shown, it needs to receive the focus. IE supports loDiv.focus(), for example. That works. But, Firefox does not support that. So, we have to come up with a workaround for Firefox. One idea was to create a form which just one INPUT Type=Text on top of my div and set the focus to that field. But, the problem is that such an approach requires to hide the form. And, of course, as you would have known it, if a form is hidden, it cannot receive a focus. In order for something to receive a focus, it need to be visible. But, some of my DIV does not contain a form thus this complicates things to have the focus on it.
>
>Any idea?
Move the form to negative coordinates, just like we did in Fox. It will be formally visible, just off the viewport.
I've seen this used for other purposes (one version of autogrow editbox did that), although it didn't move the form - the form was there already - it created ghost versions of other controls at -10000, -10000.