Skip to content

Commit

Permalink
Fix unexpected closing of preferences dialog (#9225)
Browse files Browse the repository at this point in the history
* Fix unexpected closing of preferences dialog

* Update CHANGELOG.md

Co-authored-by: Christoph <siedlerkiller@gmail.com>
  • Loading branch information
0x002A and Siedlerchr authored Oct 9, 2022
1 parent b1bbfb0 commit a114ddc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}

Expand Down

0 comments on commit a114ddc

Please sign in to comment.