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

Pressing ESC while searching clears searchfield and selects first available entry #3760

Merged
merged 3 commits into from
Mar 16, 2018

Conversation

mohamean
Copy link
Contributor

As the title describes, search field gets cleared when pressing the escape key during search and selects first available entry, this time using JavaFX.

Description already existent in CHANGELOG.md from earlier pull request (on older Swing platform).

Reference: #3747


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Screenshots added (for bigger UI changes)
  • Manually tested changed features in running JabRef
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

Copy link
Member

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick follow-up! The code is almost good to go.


// Clears search on ESC & select first entry, if available
searchField.setOnKeyPressed((event -> {
if (event.getCode() == KeyCode.ESCAPE) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Clear search" shortcut is customizable. Please use

CLEAR_SEARCH("Clear search", Localization.lang("Clear search"), "ESCAPE", KeyBindingCategory.SEARCH),

to check for the correct key (using a KeyBindingRepository).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just take a look at the setupKeyBindings in the EntryEditor, we use that code in several other classes, too.

@lenhard lenhard added the PE1718 label Feb 21, 2018
@koppor
Copy link
Member

koppor commented Mar 9, 2018

No activity. @tobiasdiez or @Siedlerchr please take over or just close this PR.

@koppor koppor removed the PE1718 label Mar 9, 2018
Copy link
Member

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now finished the code. For me, this is now ready for merge.

@tobiasdiez tobiasdiez added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Mar 9, 2018
@koppor koppor merged commit d99d2d8 into JabRef:maintable-beta Mar 16, 2018
@koppor koppor removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants