3.2.0

focus

How can I set focus on grid if I have textbox and grid on one page?
jfandly
January 16,
obj.setAttribute("tabIndex", 1);

After that you should be able to use tab navigation and also

obj.element().focus()
Alex (ActiveWidgets)
January 17,
In iexplorer is ok, but in netscape does not work. Is it possible this in netscape ?
jfandly
January 19,
Unfortunately mozilla does not support tab navigation and focus() method on DIV element. Solving that involves much more than I thought initially. So this one will be in the next release (0.2.5 ?)
Alex (ActiveWidgets)
January 20,
Any update on getting obj.element().focus() to work with Mozilla, or is there another way that I can do this in Mozilla?
Tim
June 10,
No, so far I am not able to emulate focus method for a DIV in Mozilla
Alex (ActiveWidgets)
June 13,
FYI, while trying to solve this problem myself I found this page (which unforunately did not have an answer. ;().
I found the solution in a newsgroup. Mozilla browsers support a proprietary CSS rule that will allow any element to be "focused":

<div style="-moz-user-focus: normal;"></div>

or

div.myclass
{-moz-user-focus: normal;}

Works like a charm for me.
Niall (n i a l l @ k s t . c o m)
June 16,
Yes, thats correct. The element will receive focus when you click on it, but focus() method still doesn't work :-(
Alex (ActiveWidgets)
June 17,
document.forms["formName"].elements["elementName"].focus();
Dan
June 23,
focus() method is buggy in IE as well (with Grid 1.0.1)

If you have something before the grid on the page, then call focus() on the grid element, it moves the grid to the top of the page, overwriting whatever was there.
Adrien de Croy
July 7,

This topic is archived.

See also:


Back to support forum