Hi,

I have gwt app that is placed in 600x750px box, centered on the screen. The
left part of this box is vertical menu that contains labels. When the
browser window is in full size the labels are working, but when i begin
unmaximize (resize) the browser window after some point they become inactive
- onClick is not fired when i click on some of the labels. Instead, if i
move the mouse little after the label content and click it is working. This
is happening in FF and safari, in IE it works.

Here is my code:
Custom link:
public class CustomLink extends Label {

    public CustomLink(String title) {
        super(title);
        this.setStyleName("custom-link");
        this.setHorizontalAlignment(ALIGN_LEFT);
    }
}

In the MenuView:
private final VerticalPanel main = new VerticalPanel();
................


    // click handler that changes the styles:
    final ClickHandler clickHandler = new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickevent) {
                final CustomLink link = ((CustomLink)
clickevent.getSource());
                final Iterator<Widget> i = main.iterator();
                while (i.hasNext()) {
                    final Widget w = i.next();
                    if (w instanceof CustomLink) {
                        final CustomLink bl = (CustomLink) w;
                        bl.removeStyleName("link-selected");
                        bl.addStyleName("link");
                    }
                }
                link.removeStyleName("link");
                link.addStyleName("link-selected");
            }
        };

    main.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    link1 = new CustomLink("link1");
    link.addClickHandler(clickHandler);

    main.add(link1);

    addLineSeparator();

    link2 = new CustomLink("link2";
    link2.addClickHandler(clickHandler);
    main.add(link2);

    addLineSeparator();
................
css:
link-selected {
    margin-left: 10px;
    cursor: pointer;
    cursor: hand;
    font-size: 11px;
    font-weight: bold;
    color: #003366;
    font-family: Arial;
}

.link {
    text-decoration: none;
    margin-left: 10px;
    cursor: pointer;
    cursor: hand;
    font-size: 11px;
    color: #003366;
    font-family: Arial;
}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to