ChangeScreen2: Fix position of ReplyBox
Currently, ReplyBox is misplaced or even missing when the page is not scrolled to the top. Fix by scrolling the page to the top before showing the PopupPanel. Change-Id: Iea04ac40855a2588fc6eec9adca46fd11fcf937a
This commit is contained in:

committed by
Shawn Pearce

parent
da41bfe78a
commit
f90bcdc7af
@@ -23,6 +23,7 @@ import com.google.gerrit.reviewdb.client.PatchSet;
|
||||
import com.google.gwt.core.client.JsArrayString;
|
||||
import com.google.gwt.event.logical.shared.CloseEvent;
|
||||
import com.google.gwt.event.logical.shared.CloseHandler;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.ui.PopupPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwtexpui.globalkey.client.GlobalKey;
|
||||
@@ -101,6 +102,7 @@ class ReplyAction {
|
||||
}
|
||||
});
|
||||
p.add(replyBox);
|
||||
Window.scrollTo(0, 0);
|
||||
p.showRelativeTo(replyButton);
|
||||
GlobalKey.dialog(p);
|
||||
popup = p;
|
||||
|
@@ -49,7 +49,6 @@ import com.google.gwt.resources.client.CssResource;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.uibinder.client.UiHandler;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.Button;
|
||||
import com.google.gwt.user.client.ui.CheckBox;
|
||||
@@ -154,7 +153,6 @@ class ReplyBox extends Composite {
|
||||
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
||||
@Override
|
||||
public void execute() {
|
||||
Window.scrollTo(0, 0);
|
||||
message.setFocus(true);
|
||||
}});
|
||||
Scheduler.get().scheduleFixedDelay(new RepeatingCommand() {
|
||||
|
Reference in New Issue
Block a user