Skip to content

Commit

Permalink
Fix that web search pane steals input (#4335)
Browse files Browse the repository at this point in the history
Fixes #4330 by making the search button in the web search pane not the default button.
  • Loading branch information
tobiasdiez authored Sep 11, 2018
1 parent 8971a4f commit 7775e05
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ protected Node createContentPane() {

// Create text field for query input
TextField query = SearchTextField.create();
query.setOnAction(event -> viewModel.search());
viewModel.queryProperty().bind(query.textProperty());

// Create button that triggers search
Button search = new Button(Localization.lang("Search"));
search.setDefaultButton(true);
search.setDefaultButton(false);
search.setOnAction(event -> viewModel.search());

// Put everything together
Expand Down

0 comments on commit 7775e05

Please sign in to comment.