Inline-edit: set focus to content when file exists

When editing existing file content focus in EditFileBox should be set to
content area, but when new file is going to be added then path input
should have focus.

Change-Id: I2aa491d0efaa43fde5b67a2c38c50a0a7a516f7f
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
This commit is contained in:
Dariusz Luksza 2014-09-11 10:40:47 +02:00 committed by Dave Borowitz
parent 47bec15d6e
commit af9d129d54

View File

@ -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);
}
}});
}