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

BibTeX Key Generator: User has to press ENTER before clicking on Save #5825

Open
1 task done
jorgman1 opened this issue Jan 10, 2020 · 19 comments
Open
1 task done

BibTeX Key Generator: User has to press ENTER before clicking on Save #5825

jorgman1 opened this issue Jan 10, 2020 · 19 comments
Labels
preferences status: depends-on-external A bug or issue that depends on an update of an external library type: enhancement ui

Comments

@jorgman1
Copy link

jorgman1 commented Jan 10, 2020

JabRef version 5.0-beta.21 on Windows 7 x64 and Linux Mint 18.1 (Ubuntu 16.04)

It is not possible to change the default key pattern. When clicking on it, it is possible to change it, but once the focus of the field is lost, it resets to the old value.

@calixtus
Copy link
Member

Does it fail in library properties or in the global preferences?

@jorgman1
Copy link
Author

In the global preferences.

I didn't know that one could set it as well in the libary preferences. But it is a good temporary solution. Thanks!

@calixtus
Copy link
Member

Thanks. I'm going to take a look.

@calixtus
Copy link
Member

calixtus commented Jan 12, 2020

Mystery solved: In order to save the changes, you have to press return in the text field after entering the change. Maybe I'm going to implement a focus lost event here, so it gets saved also if you just click somewhere outside the field. But thanks for the tip anyway.

@jorgman1
Copy link
Author

Yeah, maybe it is useful to have a focus lost event there saving the last status.

Thank you for your quick response!

@jorgman1
Copy link
Author

Something similar happens when editing journal abbreviations. One has to press enter to save the changes in that field.

@Siedlerchr
Copy link
Member

Siedlerchr commented Jan 18, 2020

Yes this is weird, but it's actually the default standard for tables within the JavaFX gui framework we use
I hate it as well.

@calixtus
Copy link
Member

Looks like others had this problem too. At least there are already some hacks around.
https://stackoverflow.com/questions/29576577/tableview-doesnt-commit-values-on-focus-lost-event

@jorgman1
Copy link
Author

You're right. Apparently there is an eight year old issue in JDK. It doesn't seem that they are going to change this behaviour soon.

Are there tables in Jabref that need to remain unchanged when the focus is lost?

@wujastyk
Copy link

JabRef 5.0-beta.491--2020-02-26--0839875
Linux 5.3.0-40-generic amd64
Java 13.0.2

I just had this problem today too and was glad to find the solution here. I suggest documenting it LOUDLY in the help text: https://docs.jabref.org/setup/bibtexkeypatterns

@Siedlerchr
Copy link
Member

Feel free to edit the docs, just click on edit at github and you can edit the content

@koppor koppor changed the title BibTeX Key Generator: not possible to change key pattern BibTeX Key Generator: User has to press ENTER before clicking on Save Mar 1, 2020
@mikegilchrist
Copy link

mikegilchrist commented May 20, 2020

Even if I hit enter, changes to my BibTeX Key Patterns don't appear to be saved when I revisit the BiBTeX Key Generator tab in the preference . However, if I go to "Show Preferences" they are there. In addition, if I restart JabRef, the changes now appear in the BiBTeX Key Generator tab and are used when I click on the 'generate key' button.

I experienced similar behavior when modifying the Import Filename pattern settings.

Here's my install information. I downloaded the latest .deb version from FOSSHub today.

JabRef 5.0--2020-03-06--2e6f433
Linux 4.15.0-101-generic amd64
Java 13.0.2

@AEgit
Copy link

AEgit commented May 21, 2020

@mikegilchrist Could you try the latest dev version (the one you used is already a bit out of date)? The latest dev version can be downloaded here:
https://builds.jabref.org/master/

Always remember to make a backup of your JabRef library before using developer versions.

@mikegilchrist
Copy link

@AEgit Yes, it appears that the failure to update the preference entry and apply it until you restart the program are fixed in the dev version

JabRef 5.1--2020-05-19--fe5eec6
Linux 4.15.0-101-generic amd64
Java 14.0.1

Thanks.

@AEgit
Copy link

AEgit commented May 21, 2020

Cheers.

@Siedlerchr
Copy link
Member

Idea for a workaround: Add a hint in the table
#6770 (comment)

@koppor koppor added the status: depends-on-external A bug or issue that depends on an update of an external library label Oct 28, 2020
@calixtus
Copy link
Member

Hint: ControlsFX provides a TableView2 as a drop-in replacement for TableView claiming having solved this issue. However, this issue has had a longer discussion in the jdk bugtracker.
See this discussion on stackoverflow:
https://stackoverflow.com/questions/24694616/how-to-enable-commit-on-focuslost-for-tableview-treetableview#25291137

@Siedlerchr
Copy link
Member

From what I see it should be sufficient to use the TextField2TableCell implementation to achieve this

https://github.com/controlsfx/controlsfx/blob/jfx-13/controlsfx/src/main/java/org/controlsfx/control/tableview2/cell/TextField2TableCell.java

@koppor
Copy link
Member

koppor commented Nov 3, 2021

Link to the JDK bug tracker: https://bugs.openjdk.java.net/browse/JDK-8089514: "[TableView, TreeView, ListView, TreeTableView] Clicking outside of the edited cell, node, or entry should commit the value"

koppor pushed a commit that referenced this issue Jan 15, 2022
5563ccc Update american-society-for-microbiology.csl (#5842)
19ab80f Merge pull request #5843 from POBrien333/patch-1002
d4a6c6d double trouble
424f7fe in-text >> superscript for T&F ACS style
605253c Merge pull request #5837 from POBrien333/patch-998
eb5417d Merge pull request #5838 from alessandro-gentilini/patch-1
7d2d3f5 Fix typo
9f557b5 Re-indent CSL styles
f587e60 polyglot style
3a3fe2c Create journal-fur-kulturpflanzen-journal-of-cultivated-plants.csl
cb24633 Merge pull request #5826 from dstark/patch-7
2590a6c Merge pull request #5833 from POBrien333/patch-997
5b2481e Create nist-techpubs-jres.csl (#5756)
d2a1a49 Re-indent CSL styles
42c51d1 Update tyndale-bulletin.csl
8dae693 rework style
070586b Localize IEEE dates (#5835)
588fbfe Hopefully fix sorting in CSE author-date (#5834)
1291d72 Update physiotherapy-theory-and-practice.csl
1a64076 New Style for "Neue Kriminalpolitik (Deutsch)" (#5586)
eac93a0 Create physiotherapy-theory-and-practice.csl
2e7a9f6 Merge pull request #5832 from POBrien333/patch-996
4dfad5f Update administrative-science-quarterly.csl
f56db0f Merge pull request #5829 from benthamite/patch-1
526b0b3 Update effective-altruism-wiki.csl
e5b11eb Update effective-altruism-wiki.csl
f2a7301 Update effective-altruism-wiki.csl
5b166c2 Update university-of-roehampton-harvard.csl (#5831)
b231514 Update european-society-of-cardiology.csl (#5519)
dbd902c Re-indent CSL styles
fe8892b Update effective-altruism-wiki.csl
734fa7d Update effective-altruism-wiki.csl
2430a32 Create effective-altruism-wiki.csl
a5101b6 update modern-pathology.csl (#5828)
16f77c8 Update tyndale-bulletin.csl
ea8804e Create the-korean-journal-of-mycology.csl (#5822)
22d8be0 Patch 3 (#5825)
0220ba2 Create jcom.csl (#5819)
cd7b72b Create taylor-and-francis-council-of-science-editors-numeric.csl (#5824)
0033383 Create gomis-senegalese-medicine-thesis.csl (#5774)
b221bcc Create mycobiology.csl (#5821)
d7056f9 Re-indent CSL styles
04ae08b Update tyndale-bulletin.csl
24bd577 Re-indent CSL styles
e08d431 clean up logging
f6ac2a6 Update tyndale-bulletin.csl
e4c07f8 this should be the PR repo name
7f9936c fetch pull request from originating repo
f232f51 Update tyndale-bulletin.csl
e2ae4fc Update tyndale-bulletin.csl
f09f8db Update Sheldon to csl-styles 2.0
a4d7dec re-indent style
a903664 sheldon
7db75fc sheldon
f08dc96 sheldon
35b8bfa sheldon
04e28ca pull req checkout
9c9d061 pull req checkout
9249490 sheldon reindent
9792be6 sheldon reindent
3bced06 reindent & commit
7cc9735 Update styles README and GitHub Actions with 1.0.2 information (#5803)
205c4ea remaining dependents
9458056 fix broken styles
07ba7af fix dependents
e2e7842 Fix term hacks for transition to CSL 1.0.2 (#5801)
5c8c5e9 Replace "sub verbo" with "sub-verbo" (#5799)
7ec637c Fix CSL styles
bcd3054 update to csl/citeproc-ruby 2.0
ec13830 bundle update

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 5563ccc
@koppor koppor moved this to High priority in Features & Enhancements Nov 7, 2022
@github-project-automation github-project-automation bot moved this to Normal priority in Prioritization Nov 13, 2024
@calixtus calixtus moved this from Normal priority to High priority in Prioritization Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preferences status: depends-on-external A bug or issue that depends on an update of an external library type: enhancement ui
Projects
Status: High priority
Development

No branches or pull requests

8 participants