import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.impl.FocusImpl;
import com.vaadin.terminal.gwt.client.BrowserInfo;
-import com.vaadin.terminal.gwt.client.VConsole;
/**
* A scrollhandlers similar to {@link ScrollPanel}.
* the new vertical scroll position, in pixels
*/
public void setScrollPosition(int position) {
- if (isAndroidWithBrokenScrollTop()) {
+ if (BrowserInfo.get().isAndroidWithBrokenScrollTop()) {
ArrayList<com.google.gwt.dom.client.Element> elements = TouchScrollDelegate
.getElements(getElement());
for (com.google.gwt.dom.client.Element el : elements) {
}
}
- private boolean isAndroidWithBrokenScrollTop() {
- return BrowserInfo.getBrowserString().contains("Android 3")
- || BrowserInfo.getBrowserString().contains("Android 4");
- }
-
public void onScroll(ScrollEvent event) {
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
public void execute() {
private static TouchScrollDelegate activeScrollDelegate;
- private static final boolean androidWithBrokenScrollTop = BrowserInfo
- .getBrowserString().contains("Android 3")
- || BrowserInfo.getBrowserString().contains("Android 4");
+ private static final boolean androidWithBrokenScrollTop = BrowserInfo.get()
+ .isAndroidWithBrokenScrollTop();
public TouchScrollDelegate(Element... elements) {
scrollableElements = elements;