Hi John,

On Saturday 25 July 2009 John Spackman wrote:
> I want to be able to scroll the page so that a given control is visible; we
> have some very long forms and modal message dialogs are sometimes off
> screen.  I've tried to use qx.bom.element.Scroll.intoView but it fails with
> "body is null or not an object" at line55:
>
> My test code code looks like this:
>                
> qx.bom.element.Scroll.intoView(button1.getContentElement());
>
> Is there something I should do different, or maybe a patch I can make?
I assume you are working with a qooxdoo UI button here (qx.ui.form.Button or 
similar). If that's the case you need to write

--snip--
qx.bom.element.Scroll.intoView(button1.getContentElement().getDomElement());
--snip--

to get it working. "getContentElement()" will return an instance of a 
"qx.html.Element" which is a high-level abstraction of a DOM element (used for 
queuing and lots of other stuff). To get the real DOM element you have to call 
"getDomElement()". And that's what the "Scroll" class is working with as an 
input parameter.

Hope this helps,
  Alex

------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to