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

Paste button on maintable does not work properly #6293

Closed
1 task done
ytzemih opened this issue Apr 15, 2020 · 21 comments · Fixed by #6313, #6740 or #6808
Closed
1 task done

Paste button on maintable does not work properly #6293

ytzemih opened this issue Apr 15, 2020 · 21 comments · Fixed by #6313, #6740 or #6808
Labels
bug Confirmed bugs or reports that are very likely to be bugs os: linux
Milestone

Comments

@ytzemih
Copy link

ytzemih commented Apr 15, 2020

JabRef 5.1--2020-04-12--771af5d
Linux 5.4.19-050419-generic amd64
Java 14

Steps to reproduce the behavior:

  1. Open two different bibfiles (A and B) with a couple of entries
  2. Select and copy one or more entries from the entry table of file A (via Ctr-C or via the Copy button).
  3. Switch to the entry table of file B.
  4. Use the Paste button.
  5. (For me) The entry is not inserted in file B.
  6. Use Ctr-V instead and the entry is inserted in file B.
@AEgit
Copy link

AEgit commented Apr 18, 2020

JabRef 5.1--2020-04-14--e86d415
Windows 10 10.0 amd64
Java 14.0.1

Can confirm this issue.

@calixtus calixtus added the bug Confirmed bugs or reports that are very likely to be bugs label Apr 19, 2020
@tobiasdiez
Copy link
Member

This should be fixed in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version.

@AEgit
Copy link

AEgit commented Apr 20, 2020

JabRef 5.1--2020-04-20--bc57d22
Windows 10 10.0 amd64
Java 14.0.1

I can confirm, this has been fixed in the current dev version.

@ytzemih
Copy link
Author

ytzemih commented Apr 20, 2020

JabRef 5.1--2020-04-20--d9fe981
Linux 5.4.19-050419-generic amd64
Java 14.0.1

Can confirm, too. Thanks for the fix.

@calixtus calixtus reopened this May 4, 2020
@calixtus calixtus added this to the v5.1 milestone May 4, 2020
@calixtus
Copy link
Member

calixtus commented Jun 5, 2020

Let's follow the mac related issue in #6419 .

@calixtus calixtus closed this as completed Jun 5, 2020
@Siedlerchr Siedlerchr reopened this Aug 2, 2020
@Siedlerchr Siedlerchr modified the milestones: v5.1, v5.2 Aug 2, 2020
@Siedlerchr
Copy link
Member

We had to revert this fix as it is breaking copy pasting via keyboard shortcuts and results in duplicate entries on mac when you paste in a new library. Codewise this seems to be a general issue

@Siedlerchr
Copy link
Member

The problem is that on MacOSX the command + v triggers the keyEvent which is handled in MainTable and consumed.
However, afterwards it still propagates to the owner of the keybinding, the EditAction which then is triggered like if someone had pressed the MenuItem manually.
Seems to be this bug: https://bugs.openjdk.java.net/browse/JDK-8205915

@Siedlerchr Siedlerchr added the status: depends-on-external A bug or issue that depends on an update of an external library label Aug 2, 2020
@Siedlerchr Siedlerchr changed the title Paste button does not work properly Paste button on maintable does not work properly Aug 2, 2020
@koppor koppor modified the milestones: v5.2, v5.1 Aug 4, 2020
@koppor
Copy link
Member

koppor commented Aug 4, 2020

Decision: Disable in the code only for Mac (MainTable KeyHandler) - to get it working on Windows and Linux again.

@ytzemih
Copy link
Author

ytzemih commented Aug 27, 2020

I've just added an update to #6740

@calixtus
Copy link
Member

😫

@calixtus calixtus reopened this Aug 27, 2020
@calixtus
Copy link
Member

I've just added an update to #6740

Thanks for your update. We'll look into it.

@koppor koppor modified the milestones: v5.1, v5.2 Aug 27, 2020
@Siedlerchr
Copy link
Member

Siedlerchr commented Aug 28, 2020

I guess the problem is that it doesn't work when the focus is not on the maintable,
probably sufficient to remove the second if
https://github.com/JabRef/jabref/blob/master/src/main/java/org/jabref/gui/edit/EditAction.java

@Siedlerchr Siedlerchr removed jabcon status: depends-on-external A bug or issue that depends on an update of an external library labels Aug 28, 2020
@ytzemih
Copy link
Author

ytzemih commented Aug 28, 2020

I see, can anyone using Linux confirm this issue still being there?

@Siedlerchr
Copy link
Member

Also I noticed that the paste bug in macos is now present in the TextField. I think wee need to disable it there.

@koppor
Copy link
Member

koppor commented Aug 30, 2020

Fixed in master, will be included in the v5.1 release. Should be released in a few hours.

@jhh931
Copy link

jhh931 commented Aug 31, 2020

JabRef 5.1--2020-08-30--e023aa0
Windows 10 10.0 amd64
Java 14.0.2

Paste button does not function. Neither does ^v.

@koppor
Copy link
Member

koppor commented Aug 31, 2020

@jhh931 What did you copy? I tried copy from the maintable and paste into it.

@koppor koppor reopened this Aug 31, 2020
@ytzemih
Copy link
Author

ytzemih commented Aug 31, 2020

JabRef 5.1--2020-08-30--e023aa0
Linux 5.4.19-050419-generic amd64
Java 14.0.2

Copy and paste per button and per keyboard shortcuts works for me under Linux.
However, what I can't seem to do: Copy by keyboard and paste by button, vice versa. So, as long as you stay with one method, it seems to work. (for me)

@jhh931
Copy link

jhh931 commented Aug 31, 2020

Hey - I got some fresh new insights. Steps to reproduce:

  1. Open two different bibfiles (A and B) with a couple of entries
  2. Select and copy one or more entries from the entry table of file A (via Ctr-C or via the Copy button). (GUI says: "Copied x entries")
  3. Switch to the entry table of file B (by clicking on the tab)
  4. Right now, ^v does not work. Paste button does not work.
  5. Click below the tab of file B (e.g. on the header row or in any row with an entry).
  6. Now ^v does paste the copied entries into B. So does the Paste button.

@Siedlerchr
Copy link
Member

We probably need to remove the if for the focus owner check for maintable and assume the maintable as default if not text input control
@calixtus

Siedlerchr added a commit that referenced this issue Aug 31, 2020
Fixes #6293
Also enable paste menu/action for empty libraries with no entries yet
Siedlerchr added a commit that referenced this issue Aug 31, 2020
Fixes #6293
Also enable paste menu/action for empty libraries with no entries yet
@Siedlerchr
Copy link
Member

This issue should now be finally fixed in the new master.
https://builds.jabref.org/master/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs os: linux
Projects
Archived in project
7 participants