Left and right keys do not work in the search bar
JabRef 4.0-dev--snapshot--2017-08-06--master--b7743c4d7 Mac OS X 10.11.6 x86_64 Java 1.8.0_144
Steps to reproduce:
- input "LeftRight" in the search bar
- try to use left and right keys so that we can move the cursor and insert a space between "t" and "R"
- the left and right keys do not move the cursor
Also confirmed under Windows. The left/right keys move the focus away from the field. I think this is not really related to the keybindings, but more a focus problem. @tobiasdiez You looked into that focus problem, any idea why the focus does not stay in the field?`
I'll be so brave and add this to the 4.0 milestone as one of the things we can fix before the final release.
Even the "Mouse down" event focuses the next button. This actually renders the autocompletion useless since one cannot select the next item.
Could adding an else { e.consume(); } here fix this? https://github.com/JabRef/jabref/blob/2abf651271db920204011f6dd4253b916467d655/src/main/java/org/jabref/gui/search/GlobalSearchBar.java#L197-L212 Since i'm not a 100% certain how the searchbar should behave i don't know what to look for when testing, but i didn't see anything out of the ordinary in a quick GUI test.
Tested it. Works. Have a slight other issue (see https://github.com/koppor/jabref/issues/252), but not a blocker.
And another one, which is not directly related to this PR: https://github.com/koppor/jabref/issues/253
I did some research onto this specific issue and it seems like the problem is here the JToolBar which has an implicit KeyListener registered for the arrow keys. So I guess when we rework the toolbar the workaround should be no longer necessary https://stackoverflow.com/a/17049479/3450689