diff --git a/CHANGELOG.md b/CHANGELOG.md index c05efe9c412..82efe996982 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,7 +63,8 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We fixed an issue where pdfs were re-indexed on each startup. [#9166](https://github.com/JabRef/jabref/pull/9166) - We fixed an issue where Capitalize didn't capitalize words after hyphen characters. [#9157](https://github.com/JabRef/jabref/issues/9157) - We fixed an issue with the message that is displayed when fetcher returns an empty list of entries for given query. [#9195](https://github.com/JabRef/jabref/issues/9195) -- We fixed a typo within a connection error message. [#625](https://github.com/koppor/jabref/issues/625) +- We fixed an issue where hitting enter on the search field within the preferences dialog closed the dialog. [koppor#630](https://github.com/koppor/jabref/issues/630) +- We fixed a typo within a connection error message. [koppor#625](https://github.com/koppor/jabref/issues/625) ### Removed diff --git a/src/main/java/org/jabref/gui/preferences/PreferencesDialogView.java b/src/main/java/org/jabref/gui/preferences/PreferencesDialogView.java index a4bb0baab0c..b366d81c3db 100644 --- a/src/main/java/org/jabref/gui/preferences/PreferencesDialogView.java +++ b/src/main/java/org/jabref/gui/preferences/PreferencesDialogView.java @@ -6,6 +6,7 @@ import javafx.scene.control.ButtonType; import javafx.scene.control.ListView; import javafx.scene.control.ScrollPane; +import javafx.scene.input.KeyCode; import org.jabref.gui.DialogService; import org.jabref.gui.JabRefFrame; @@ -51,6 +52,13 @@ public PreferencesDialogView(JabRefFrame frame) { ControlHelper.setAction(saveButton, getDialogPane(), event -> savePreferencesAndCloseDialog()); + // Stop the default button from firing when the user hits enter within the search box + searchBox.setOnKeyPressed(event -> { + if (event.getCode() == KeyCode.ENTER) { + event.consume(); + } + }); + themeManager.updateFontStyle(getDialogPane().getScene()); }