diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/EditFileBox.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/EditFileBox.java index 0a3d356afb..be3ecd25c2 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/EditFileBox.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/EditFileBox.java @@ -71,7 +71,11 @@ class EditFileBox extends Composite { Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { - file.setFocus(true); + if (fileName.isEmpty()) { + file.setFocus(true); + } else { + content.setFocus(true); + } }}); }