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

Double click on entry at "Check integrity" focus bug fixed #12022

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mulla028
Copy link

@mulla028 mulla028 commented Oct 19, 2024

Description

This PR aims on a bug fix, when user was double clicking on entry at Check Integrity, entry was focused, but not a field in entry editor.

Changes

In src/main/java/org/jabref/gui/entryeditor/EntryEditor.java two lines of code were added to setFocusToField()

  1. Comment
  2. getScene().getWindow().requestFocus();

This line explicitly brings focus back to the main window containing the Entry Editor. It fixes a field focus bug.

Screenshot of changed UI

image

As you can see on screenshot bug is fixed!

Mandatory checks

  • I own the copyright of the code submitted and I licence it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

…); to make sure that focus goes to the field even when dialog window is opened
@mulla028
Copy link
Author

@koppor
I really enjoyed contributing on your project! Thank you for this opportunity!
If you have any questions or suggestions regarding this PR, just let me know 🫡

@koppor koppor marked this pull request as draft October 19, 2024 09:22
Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

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

Please re-iterate on the issue description: #11997

Here, especially for you, another description.

  1. Start JabRef

  2. Open chocolate.bib - you find it at https://github.com/JabRef/jabref/blob/main/src/test/resources/testbib/Chocolate.bib

  3. Seelct entry "Cocoa and Cardiovascular Health"

  4. Select tab "General" in Entry editor

  5. Select field DOI
    image

  6. Go to Menu "Quality"

  7. Click on "Check integrity"

  8. Double click on the first entry "Corti_2009"
    image

  9. See that nothing happens

In Step 9, the tab "Requried fiels" and the field "Citatoinkey" should be focused.

@koppor koppor added the status: changes required Pull requests that are not yet complete label Oct 19, 2024
@mulla028
Copy link
Author

Please re-iterate on the issue description: #11997

Here, especially for you, another description.

  1. Start JabRef
  2. Open chocolate.bib - you find it at https://github.com/JabRef/jabref/blob/main/src/test/resources/testbib/Chocolate.bib
  3. Seelct entry "Cocoa and Cardiovascular Health"
  4. Select tab "General" in Entry editor
  5. Select field DOI
    image
  6. Go to Menu "Quality"
  7. Click on "Check integrity"
  8. Double click on the first entry "Corti_2009"
    image
  9. See that nothing happens

In Step 9, the tab "Requried fiels" and the field "Citatoinkey" should be focused.

Thank you for your feedback! Will do my best!

@mulla028
Copy link
Author

@koppor
You mean that after I opened General tab, and then in Check Integrity once I double click on entry it should focus on both fields:

  1. Citation Key
  2. Field?

@Siedlerchr
Copy link
Member

It should focus on the field that is reported in the integrity check

@mulla028
Copy link
Author

It should focus on the field that is reported in the integrity check

Thank you for your response! I'm pretty new to this project. Would it be possible to share a little detailed description? If not, I will do my best to figure all out myself.

@mulla028
Copy link
Author

mulla028 commented Oct 23, 2024

@Siedlerchr
What I don't understand is that current PR supports this feature according on as much I understand.
Following an example by @koppor, he claims that If I click on the first entry Corti2009 nothing happens. However, my end shows me that current field CitationKey focused.
Sharing with you screenshot:
image

Please let me know if I misunderstand you! Thank you!

@Siedlerchr
Copy link
Member

That is indeed correct, however, in my tests jumping to another tab only works sometimes:

  1. Open chocolate bib
  2. check integrity
  3. click on an entry with DOI => The required information tab stays open

However, if I now select the general Tab of an entry, I am able to jump to it/again to it
Same applies to pages field

Please check why the tab needs to have been selected first

@mulla028
Copy link
Author

That is indeed correct, however, in my tests jumping to another tab only works sometimes:

  1. Open chocolate bib
  2. check integrity
  3. click on an entry with DOI => The required information tab stays open

However, if I now select the general Tab of an entry, I am able to jump to it/again to it Same applies to pages field

Please check why the tab needs to have been selected first

Oh now I understand where you are getting at! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: changes required Pull requests that are not yet complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Double click on entry at "Check integrity" should focus the entry and field
3 participants