From c655310fff42a489bd81bb39ea25f8f619b15ea0 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sat, 12 Oct 2019 12:36:09 +0200 Subject: [PATCH] Fix cursor jump Fixes #5084. The entry editor was very aggressive and stole the focus from the search bar or from the main table. This lead to problems like #5084 where users overwrite the contents of the entry while doing a search. Moreover, it made it impossible to navigate between entries using the arrow keys in the main table. Both of these issues are fixed now. --- CHANGELOG.md | 1 + .../gui/entryeditor/FieldsEditorTab.java | 30 +------------------ 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2aeb6f5e9a..9e177677997 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - We fixed an error where the number of matched entries shown in the group pane was not updated correctly. [#4441](https://github.com/JabRef/jabref/issues/4441) - We fixed an issue where empty keywords lead to a strange display of automatic keyword groups. [#5333](https://github.com/JabRef/jabref/issues/5333) - We fixed an error where the default color of a new group was white instead of dark gray. [#4868](https://github.com/JabRef/jabref/issues/4868) +- We fixed an issue where the first field in the entry editor got the focus while performing a different action (like searching). [#5084](https://github.com/JabRef/jabref/issues/5084) - We fixed an error mentioning "javafx.controls/com.sun.javafx.scene.control" that was thrown when interacting with the toolbar. - We fixed an error where a cleared search was restored after switching libraries. [#4846](https://github.com/JabRef/jabref/issues/4846) - We fixed an exception which occurred when trying to open a non-existing file from the "Recent files"-menu [#5334](https://github.com/JabRef/jabref/issues/5334) diff --git a/src/main/java/org/jabref/gui/entryeditor/FieldsEditorTab.java b/src/main/java/org/jabref/gui/entryeditor/FieldsEditorTab.java index eba5b206523..ec62128dbc2 100644 --- a/src/main/java/org/jabref/gui/entryeditor/FieldsEditorTab.java +++ b/src/main/java/org/jabref/gui/entryeditor/FieldsEditorTab.java @@ -5,13 +5,11 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.SortedSet; import java.util.stream.Stream; import javax.swing.undo.UndoManager; -import javafx.application.Platform; import javafx.geometry.VPos; import javafx.scene.Node; import javafx.scene.Parent; @@ -46,7 +44,6 @@ abstract class FieldsEditorTab extends EntryEditorTab { private final SuggestionProviders suggestionProviders; private final DialogService dialogService; private PreviewPanel previewPanel; - private FieldEditorFX activeField; private UndoManager undoManager; private Collection fields = new ArrayList<>(); private GridPane gridPane; @@ -82,7 +79,6 @@ private void setupPanel(BibEntry entry, boolean compressed, SuggestionProviders fields = determineFieldsToShow(entry); List