Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESC should close the dialog #8888

Open
2 tasks done
koppor opened this issue Jun 6, 2022 · 9 comments · Fixed by #9268
Open
2 tasks done

ESC should close the dialog #8888

koppor opened this issue Jun 6, 2022 · 9 comments · Fixed by #9268
Labels
bug Confirmed bugs or reports that are very likely to be bugs keybinding

Comments

@koppor
Copy link
Member

koppor commented Jun 6, 2022

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

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Open preferences
  2. Select "Citation key generator"
    grafik
  3. Press ESC
  4. nothing happens
  5. Select line "Article" in the table
  6. Press ESC
  7. Nothing happens

Expectation: at step 4 and 7, the dialog should close

Appendix

...

Log File
Paste an excerpt of your log file here
@Siedlerchr
Copy link
Member

All tabs in the preferences need to be checked for this behavior.
External file tab, for example, works. Journal abbreviations not.

@Siedlerchr Siedlerchr added the bug Confirmed bugs or reports that are very likely to be bugs label Jun 6, 2022
@koppor
Copy link
Member Author

koppor commented Jun 6, 2022

Same for the error log

@HoussemNasri
Copy link
Member

Might be related #7392 (comment)

@sjb-ch1mp
Copy link
Contributor

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.

@Siedlerchr
Copy link
Member

@sjb-ch1mp Thanks for taking a look! There was also recently another related issue to the use of the ENTER buton #9225
Maybe that helps you

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

Partially fixed by @sjb-ch1mp in #9268 .

A different strategy might be needed to address it for all ListViews. Perhaps https://stackoverflow.com/a/66878882 can be useful.

@sjb-ch1mp
Copy link
Contributor

@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.

@koppor
Copy link
Member Author

koppor commented Oct 25, 2022

ESC should not close the dialog of a field is focused. Then, just the field should be left. Example:

image

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.

@koppor
Copy link
Member Author

koppor commented Oct 27, 2024

It should be implemented - if the super constructor is called --> org.jabref.gui.util.BaseDialog#BaseDialog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs keybinding
Projects
Status: Low priority
6 participants