Permalink
Browse files

Fix: Keep editor focused on File|Save.

  • Loading branch information...
jusu committed Sep 20, 2018
1 parent ad8cd31 commit 3ae2dec0c212e0946387df0cad53b540686b471a
Showing with 8 additions and 2 deletions.
  1. +1 −0 CHANGELOG.md
  2. +7 −2 src/com/pinktwins/elephant/ElephantWindow.java
View
@@ -3,6 +3,7 @@
##v49
- Added Edit | Paste Without Styles
- Added Note | Show in Finder
- Fix: File | Save now keeps editor focused to prevent accidental keystrokes to note list. Use ESC to unfocus editor.
##v48
- Added CSS error checking
@@ -213,8 +213,13 @@ public void actionPerformed(ActionEvent e) {
ActionListener saveNoteAction = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
noteEditor.focusEditor();
unfocusEditor();
// Save, keep editor focused.
noteEditor.saveChanges();
noteEditor.editingFocusGained();
// Previously, save by unfocusing editor:
//noteEditor.focusEditor();
//unfocusEditor();
}
};

0 comments on commit 3ae2dec

Please sign in to comment.