Skip to content

Commit

Permalink
Fix #3062: Ctrl + F works again
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez committed Aug 6, 2017
1 parent 774da9f commit 973b127
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ If fetched article is already in database the ImportInspectionDialog is started

- We fixed an issue where the fetcher for the Astrophysics Data System (ADS) added some non-bibtex data to the entry returned from the search [#3035](https://github.com/JabRef/jabref/issues/3035)
- We fixed an issue where assigning an entry via drag and drop to a group caused JabRef to stop/freeze completely [#3036](https://github.com/JabRef/jabref/issues/3036)
- We fixed the shortcut <kbd>Ctrl</kbd>+<kbd>F</kbd> for the search field.
- We fixed an issue where the preferences could not be imported without a restart of JabRef [#3064](https://github.com/JabRef/jabref/issues/3064)
- We fixed an issue where <kbd>DEL</kbd>, <kbd>Ctrl</kbd>+<kbd>C</kbd>, <kbd>Ctrl</kbd>+<kbd>V</kbd> and <kbd>Ctrl</kbd>+<kbd>A</kbd> in the search field triggered corresponding actions in the main table [#3067](https://github.com/JabRef/jabref/issues/3067)
### Removed
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/jabref/gui/search/GlobalSearchBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public class GlobalSearchBar extends JPanel {
private final JLabel currentResults = new JLabel("");
private final SearchQueryHighlightObservable searchQueryHighlightObservable = new SearchQueryHighlightObservable();
private final JButton openCurrentResultsInDialog = new JButton(IconTheme.JabRefIcon.OPEN_IN_NEW_WINDOW.getSmallIcon());
private final JFXPanel container;
private SearchWorker searchWorker;
private GlobalSearchWorker globalSearchWorker;

Expand Down Expand Up @@ -185,7 +186,7 @@ public void actionPerformed(ActionEvent e) {

EasyBind.subscribe(searchField.textProperty(), searchText -> performSearch());

JFXPanel container = new JFXPanel();
container = new JFXPanel();
DefaultTaskExecutor.runInJavaFXThread(() -> {
container.setScene(new Scene(searchField));
container.addKeyListener(new KeyAdapter() {
Expand Down Expand Up @@ -315,6 +316,7 @@ public void endSearch() {
*/
public void focus() {
if (!searchField.isFocused()) {
container.requestFocus();
searchField.requestFocus();
}
searchField.selectAll();
Expand Down

0 comments on commit 973b127

Please # to comment.