jabref
jabref copied to clipboard
ESC should close the dialog
JabRef version
Latest development branch build (please note build date below)
Operating system
Windows
Details on version and operating system
No response
Checked with the latest development build
- [X] I made a backup of my libraries before testing the latest development version.
- [X] I have tested the latest development version and the problem persists
Steps to reproduce the behaviour
- Open preferences
- Select "Citation key generator"
- Press ESC
- nothing happens
- Select line "Article" in the table
- Press ESC
- Nothing happens
Expectation: at step 4 and 7, the dialog should close
Appendix
...
Log File
Paste an excerpt of your log file here
All tabs in the preferences need to be checked for this behavior. External file tab, for example, works. Journal abbreviations not.
Same for the error log
Might be related https://github.com/JabRef/jabref/issues/7392#issuecomment-902222582
JabRef 100.0.0 Windows 11 10.0 amd64 Java 18.0.2.1 JavaFX 19+11
When testing this issue - it appears to be the case that if I select any tab (even the General tab that is already selected when the dialog opens) then the ESC button will not close the dialog as expected. This issue appears to be more 'newcomer-friendly' than the previous issue I selected. If possible, I would like to have it assigned to me so that I can attempt to resolve this bug.
@sjb-ch1mp Thanks for taking a look! There was also recently another related issue to the use of the ENTER buton https://github.com/JabRef/jabref/pull/9225 Maybe that helps you
Partially fixed by @sjb-ch1mp in #9268 .
A different strategy might be needed to address it for all ListView
s. Perhaps https://stackoverflow.com/a/66878882 can be useful.
@k3KAW8Pnf7mkmdSMPHz27 Thanks so much for your feedback! I was under the impression that I had tested the other ListViews that appeared in the different menus, but I clearly was not very thorough because I immediately found more that did not respect the CLOSE event, for example:
Options > Preferences > Citation key generator > Key patterns Options > Preferences > Journal abbreviations > Journal abbreviations Library > Library properties > Citation key patterns
Working under the hypothesis that the event is being consumed before it can reach the ListView component - I implemented an EventFilter in the BaseDialog class that specifically listens for the CLOSE event during the event capturing phase. This appears to have worked for all ListViews in all dialogs (as opposed to just the main Preferences tabs).
I have implemented this solution in #9275.
ESC should not close the dialog of a field is focused. Then, just the field should be left. Example:
Pressing ESC when the cursor is in the search field, ESC should clear the search - and then leave the cursor in the field. - A second ESC press can then close the dialog.