I have found what I think is a bug in the interaction between FocusPanel and ScrollPanel on Safari and Chrome. What I'm seeing is that when you create a FocusPanel and put it inside a ScrollPanel, clicking inside the focus panel cause the scroll panel to scroll to the top.
I think that what's happening here is that the browser is scrolling to bring into view the hidden input element that FocusImplSafari creates. I'm seeing this in GWT 1.5.2. I found a similar issue here (although this is marked fixed): http://code.google.com/p/google-web-toolkit/issues/detail?id=1313 Here's a code snippet that shows the necessary parts to make the bug happen....just run this in web mode on safari or chrome, scroll the window down a bit, then click on one of the labels to see the window scroll back to the top. public class FooPanel extends DockPanel { public FooPanel() { VerticalPanel ap = new VerticalPanel(); for (int i = 0; i < 50; i++) { ap.add(new Label(Integer.toString(i))); } MyFocusPanel focus = new MyFocusPanel(); focus.setWidget(ap); super.add(new ScrollPanel(focus), DockPanel.CENTER); } } // you can use the normal FocusPanel to show the bug....this just shows it's the FocusImpl that's the problem class MyFocusPanel extends SimplePanel { static final FocusImpl impl = FocusImpl.getFocusImplForPanel(); public MyFocusPanel() { super(impl.createFocusable()); } } Paul --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
