浏览代码

Fix table scrolling up on select (#10106)

Change-Id: I4d13bee983817ce299d1f7e52ddd6cdc725fee6f
tags/7.2.2
Juuso Valli 10 年前
父节点
当前提交
5d584c858b
共有 1 个文件被更改,包括 11 次插入1 次删除
  1. 11
    1
      client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java

+ 11
- 1
client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java 查看文件

@@ -17,6 +17,8 @@ package com.vaadin.client.ui.orderedlayout;

import java.util.List;

import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.ui.Widget;
@@ -505,7 +507,15 @@ public abstract class AbstractOrderedLayoutConnector extends
updateLayoutHeight();
if (needsExpand()) {
getWidget().updateExpandedSizes();
getWidget().updateExpandCompensation();
// updateExpandedSizes causes fixed size components to temporarily
// lose their size. updateExpandCompensation must be delayed until
// the browser has a chance to measure them.
Scheduler.get().scheduleFinally(new ScheduledCommand() {
@Override
public void execute() {
getWidget().updateExpandCompensation();
}
});
} else {
getWidget().clearExpand();
}

正在加载...
取消
保存