diff --git a/CHANGELOG.md b/CHANGELOG.md
index f23a80be7c8..5c84f5424c4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -88,6 +88,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We fixed an issue where the Undo/Redo buttons were active even when all libraries are closed. [#11837](https://github.com/JabRef/jabref/issues/11837)
- We fixed an issue where recently opened files were not displayed in the main menu properly. [#9042](https://github.com/JabRef/jabref/issues/9042)
- We fixed an issue where the DOI lookup would show an error when a DOI was found for an entry. [#11850](https://github.com/JabRef/jabref/issues/11850)
+- We fixed an issue where Tab cannot be used to jump to next field in some single-line fields. [#11785](https://github.com/JabRef/jabref/issues/11785)
### Removed
diff --git a/src/main/java/org/jabref/gui/edit/CopyDoiUrlAction.java b/src/main/java/org/jabref/gui/edit/CopyDoiUrlAction.java
index 7dec0abeae1..f8d7f173acd 100644
--- a/src/main/java/org/jabref/gui/edit/CopyDoiUrlAction.java
+++ b/src/main/java/org/jabref/gui/edit/CopyDoiUrlAction.java
@@ -2,7 +2,7 @@
import java.util.Optional;
-import javafx.scene.control.TextArea;
+import javafx.scene.control.TextField;
import org.jabref.gui.ClipBoardManager;
import org.jabref.gui.DialogService;
@@ -16,12 +16,12 @@
*/
public class CopyDoiUrlAction extends SimpleCommand {
- private final TextArea component;
+ private final TextField component;
private final StandardActions action;
private final DialogService dialogService;
private final ClipBoardManager clipBoardManager;
- public CopyDoiUrlAction(TextArea component, StandardActions action, DialogService dialogService, ClipBoardManager clipBoardManager) {
+ public CopyDoiUrlAction(TextField component, StandardActions action, DialogService dialogService, ClipBoardManager clipBoardManager) {
this.component = component;
this.action = action;
this.dialogService = dialogService;
diff --git a/src/main/java/org/jabref/gui/fieldeditors/EditorTextArea.java b/src/main/java/org/jabref/gui/fieldeditors/EditorTextArea.java
index 7b478f94695..fc18e591103 100644
--- a/src/main/java/org/jabref/gui/fieldeditors/EditorTextArea.java
+++ b/src/main/java/org/jabref/gui/fieldeditors/EditorTextArea.java
@@ -21,7 +21,7 @@ public class EditorTextArea extends TextArea implements Initializable, ContextMe
/**
* Variable that contains user-defined behavior for paste action.
*/
- private PasteActionHandler pasteActionHandler = () -> {
+ private Runnable pasteActionHandler = () -> {
// Set empty paste behavior by default
};
@@ -57,7 +57,7 @@ public void initialize(URL location, ResourceBundle resources) {
*
* @param handler an instance of PasteActionHandler that describes paste behavior
*/
- public void setPasteActionHandler(PasteActionHandler handler) {
+ public void setPasteActionHandler(Runnable handler) {
Objects.requireNonNull(handler);
this.pasteActionHandler = handler;
}
@@ -68,14 +68,6 @@ public void setPasteActionHandler(PasteActionHandler handler) {
@Override
public void paste() {
super.paste();
- pasteActionHandler.handle();
- }
-
- /**
- * Interface presents user-described paste behaviour applying to paste method
- */
- @FunctionalInterface
- public interface PasteActionHandler {
- void handle();
+ pasteActionHandler.run();
}
}
diff --git a/src/main/java/org/jabref/gui/fieldeditors/EditorTextField.java b/src/main/java/org/jabref/gui/fieldeditors/EditorTextField.java
index 34fd2be09f4..08cd9dde886 100644
--- a/src/main/java/org/jabref/gui/fieldeditors/EditorTextField.java
+++ b/src/main/java/org/jabref/gui/fieldeditors/EditorTextField.java
@@ -2,6 +2,7 @@
import java.net.URL;
import java.util.List;
+import java.util.Objects;
import java.util.ResourceBundle;
import java.util.function.Supplier;
@@ -19,6 +20,9 @@
public class EditorTextField extends TextField implements Initializable, ContextMenuAddable {
private final ContextMenu contextMenu = new ContextMenu();
+ private Runnable additionalPasteActionHandler = () -> {
+ // No additional paste behavior
+ };
public EditorTextField() {
this("");
@@ -47,4 +51,15 @@ public void initContextMenu(final Supplier> items, KeyBindingRepo
public void initialize(URL location, ResourceBundle resources) {
// not needed
}
+
+ public void setAdditionalPasteActionHandler(Runnable handler) {
+ Objects.requireNonNull(handler);
+ this.additionalPasteActionHandler = handler;
+ }
+
+ @Override
+ public void paste() {
+ super.paste();
+ additionalPasteActionHandler.run();
+ }
}
diff --git a/src/main/java/org/jabref/gui/fieldeditors/ISSNEditor.fxml b/src/main/java/org/jabref/gui/fieldeditors/ISSNEditor.fxml
index 44d70fb78c4..7358de4c2b1 100644
--- a/src/main/java/org/jabref/gui/fieldeditors/ISSNEditor.fxml
+++ b/src/main/java/org/jabref/gui/fieldeditors/ISSNEditor.fxml
@@ -3,11 +3,11 @@
-
+
-
+