NextTracker indexSee it online !

(1/245) 1962 - 4.2pre8: Keyboard focus bug in File Not Saved dialog

In the File Not Saved dialog, using the Tab key to give
the focus to either the No or Cancel button and then
pressing the enter key always carries out the action
that should be performed when Yes is pressed.

For example,
1) Open an untitled document
2) Edit it
3) Try to close it, File Not Saved dialog pops up
4) Press tab to move focus button to No or Cancel and
hit enter.
5) Save file dialog opens

Submitted manderso - 2004-01-14 14:47:23 Assigned kerik-sf
Priority 5 Labels editor core
Status open Group normal bug
Resolution None

Comments

2004-01-14 18:00:00
newagner

Logged In: YES
user_id=942446

Use the space bar instead of enter.
This is the normal AWT/Swing behavior, so it's not the
only Dialog.

Norbert

2004-01-25 18:48:45
spestov

- **status**: open --> closed

2015-03-25 15:16:06.251000
weberjn

Might be the normal AWT/Swing behavior, but it is not user-friendly. Also, I'd expect to be able to navigate to No or Cancel with the cursor keys and press the button with Enter.

2015-03-25 16:07:42.150000
daleanson

- **status**: closed --> open

2015-03-25 16:07:42.412000
daleanson

I agree, the Enter button should also work. That is typical and expected behavior.

2015-11-14 12:55:44.399000
kerik-sf

Since Java 5, it can be changed by calling
> UIManager.put("Button.defaultButtonFollowsFocus", Boolean.TRUE);

I've put it in a enter.bsh file in my %JEDIT_SETTINGS%/startup directory and it works after jEdit restart. I don't see any adverse effect.
Should we set it at jEdit startup (with a property to revert it to default) ? Are there other swing work-arounds in the code base?

2015-11-14 12:56:07.467000
kerik-sf

- **assigned_to**: Eric Le Lay