Question

I am trying to move a qx.html.Element that it is in a widget. so I create a listener to catch mouse down and a listener to catch mouse move etc etc. code in the qooxdoo playground

But a weird thing happens when I try to for example setStyle("top","30px") the getStyle("top") return "30px" but the element does not seems to responding to the changes.

I have try to use the qx.html.Element.flush() but nothing changes.

But when I try to resize the element ( setStyle("height","20px")) this change works fine ( example in commented section)

what I am missing here ?

why setStyle in resize (commented) section is working and setStyle in move section doesn't ?

Was it helpful?

Solution

The simplest explanation is that the element has position:static. top, left, right and bottom values only affect the element if it has position other than static (relative, absolute or fixed).

Be warned though, changing the value of the position property can have important effects on the layout of the widget and the entire application.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top