Skip to content

Commit

Permalink
add url input focus action
Browse files Browse the repository at this point in the history
  • Loading branch information
chengenzhao committed Nov 5, 2017
1 parent 37845c2 commit 3969203
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/whitewoodcity/controller/TabContent.java
Original file line number Diff line number Diff line change
Expand Up @@ -611,4 +611,8 @@ public ReadOnlyDoubleProperty widthproperty() {
public ReadOnlyDoubleProperty heightproperty() {
return heightProperty();
}

public void focusURLInput(){
urlInput.requestFocus();
}
}
1 change: 1 addition & 0 deletions src/main/java/com/whitewoodcity/ui/PagePane.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public void buildPane(){
Page page = new Page(Main.namesMap.get("tab").get(), this);
getTabs().add(page);
getSelectionModel().select(page);
page.getController().focusURLInput();
}

public void close(){
Expand Down

0 comments on commit 3969203

Please # to comment.