question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ESC should close the dialog

See original GitHub issue

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 <kbd>ESC</kbd>
  4. nothing happens
  5. Select line “Article” in the table
  6. Press <kbd>ESC</kbd>
  7. Nothing happens

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

Appendix

Log File
Paste an excerpt of your log file here

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
kopporcommented, Oct 25, 2022

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

image

Pressing <kbd>ESC </kbd> 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.

2reactions
sjb-ch1mpcommented, Oct 22, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Close dialog when ESC key is pressed - vue.js - Stack Overflow
This only works, if you have selected anything inside the modal. If there is no selection, the event will be triggered on the...
Read more >
[feature request] dialogs should close after pressing "esc" key
Dialogs are not closing when user presses the "esc" key. Closing with "esc" key is so common behaviour that imho it should be...
Read more >
How to Prevent Dialog Page Close By Disable Escape Key ...
In this document, we are going to see about the prevention of dialog Page close by disabling the escape key and hide the...
Read more >
Dialogue Box supposed to be closed by default with the [ESC ...
Closing the dialogue box using a shortcut should only be avalible if the message is not important: ... If the above circumstances are...
Read more >
Do not want to close aui dialogue on esc key press - Forums
RE: Do not want to close aui dialogue on esc key press (Answer) · var popupWindow = null; A.one('.generate-artform'). · // alert("open"); //...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found