Matthew Gregory wrote:
> Hi All Again,
> I have a banner with several dynamically created buttons on. When there
> are too many buttons to display I simple want it to clip what it cannot
> show (similar to overflow:hidden). I've got this to work OK, but I get
> very strange results when clicking on a button that is half visible, it
> tries to scroll the contents so the button is fully visible, but not all
> the time. I've spent a while looking through the code to try and disable
> this feature but couldn't find anything that could help.
>
> Here is a small snippet that shows the problem in the playground. I want
> it so when you click on the blue nothing happens.
> On my machine in Firefox the first box will move but the second will
> not, in IE both move.
>
> I am starting to think this is a browser feature, but I need to disable it.
>
> for (var c = 0; c < 2; c++)
> {
> var hbox = new qx.ui.container.Composite(new qx.ui.layout.HBox());
> for (var i = 0; i < 2; i++)
> {
> hbox.add(new qx.ui.core.Widget().set(
> {
> backgroundColor : i ? "blue" : "red",
> width : 100,
> focusable : true
> }));
> }
>
> hbox.setMinWidth(0);
> hbox.setWidth(c ? 120:110);
>
> this.getRoot().add(hbox, {top : c * 65});
> }
>
Matt,
in my FF3.0.10 both boxes "move". The issue here seems to be the browser
handling the focus and also scrolling into view. We've looked at it, but
there seems to be no way of forcing the browser leave things as they are
when setting the focus to a widget. E.g. there is no alterantive css
'overflow' value to be used here.
The only thing I could think of is letting go of the native "focusable"
property, and implement your own onClick handler that also changes
appearance and stuff, so you get all the behaviour you want, but without
the browser focus.
HTH,
Thomas
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel