Fix pasting on mac and linux#6419
Conversation
|
I really don't get where the bug is. Reverting this reopens issue #6293 |
|
@calixtus Whoops, I overlooked the original issue (#6293) for your PR (#6313). So, we are in some kind of situation, where we have contradicting behavior in two operating systems. That kinda sucks, since we need to differentiate between those now. :/ Last time, this was the fix: #5210, but maybe this is when we also introduced #6293?! |
|
I have been thinking this through since the hint of @Siedlerchr. The thing is, the insert command should stand here. Is there another issue with macos, some method fired by macos we did not see yet? |
|
If we don't find out the root cause in mac, we could add an ugly os check for Linux/mac |
|
I already stumbled upon other methods ( |
|
I agree with @calixtus, the command there makes sense. @LinusDietz can you debug and report which other code triggers the |
|
OS: macOS Catalina 10.15.4 (19E287) Hello everyone, I use IntelliJ Idea to start JabRef. |
|
@Gena928 Just to double check: You are on latest |
|
@koppor yes, I'm on latest master. |
|
Looks like I see an error. |
|
OK, I need some help )). Looks like
I tracked first case, and it turns out that So in general, paste command is called:
|
|
Sorry for our late reply. Would you like to create a fix for this issue following your investigations and to open a new PR, so we can probably close this one and merge your's with the master branch? |
|
@calixtus I'll be back with ideas. |
|
Does Ctrl + C or Ctrl + X also call an edit action? Maybe there is some design flaw in a hotkey, that is defined twice by setupkeybindings and the the menu command... |
|
Ctrl+X works in the same way
It looks like JabRef cut entries twice... |
|
Why do we need So, why do we need those commands in |
|
The reason is that you can define custom keybindings (options? manage keybindings) for all commands and so people can use their emacs/vim whatever paste command style. |
|
@Siedlerchr What about main menu? |
|
Linux user wanted! :-) |
|
@LyzardKing Could you assist in testing this on linux? AssiGg some other shortcuts to copy/paste |
|
Sure, I can test both stable and the version from builds.jabref.org |
|
Issue #6293 was about merging in pasting in linux and windows. Lets follow the mac related stuff here. |
|
Will look into this as I have now a mac at hand |
|
Nope, didnt fix it. But I think I found the real reason now |
|
Doesn't work on linux. |
|
In the .deb it now doesn't work even if I press Ctrl+V |
|
I think I have found the root cause now. Pasting to a new library should work now as well. Please try again when the new build is ready. |
|
new build is ready , please try pasting an entry from a library to a new empty library |
|
It works, but I have top copy Ctrl-V multiple times to get it to work if the library is empty. |
|
Works fine on Windows as well. The menu buttons are disabled on Windows as well. I think they are only activated if you have at least one entry selected. But this is a minor issue. |
|
Regarding the disabled/enabled menu items, we track the issues at JabRef#419. |
| - We fixed an issue where the INSPIRE fetcher was no longer working [#6229](https://github.com/JabRef/jabref/issues/6229) | ||
| - We fixed an issue where custom exports with an uppercase file extension could not be selected for "Copy...-> Export to Clipboard" [#6285](https://github.com/JabRef/jabref/issues/6285) | ||
| - We fixed the display of icon both in the main table and linked file editor. [#6169](https://github.com/JabRef/jabref/issues/6169) | ||
| - We fixed the paste entry command in the menu and toolbar, that did not do anything. [#6293](https://github.com/JabRef/jabref/issues/6293) |
There was a problem hiding this comment.
We should also reopen the issue as the edit->paste menu entry doesn't do anything.
|
The problem turns out to be a bit complex. We need to find a way to differ if an action was triggered by key or not or to move the keybinding from the maintable to the edit action. |
* upstream/master: (47 commits) Fix copy pasting and delete via menu or key (#6740) Add instructions how to work with fetchers (#6731) Autoinstall extension in chrome (#6442) Delete link after download (#6723) New translations JabRef_en.properties (Portuguese, Brazilian) (#6728) Bump pascalgn/automerge-action from v0.8.5 to v0.9.0 (#6736) Bump byte-buddy-parent from 1.10.13 to 1.10.14 (#6733) Bump mockito-core from 3.4.4 to 3.4.6 (#6734) Bump unirest-java from 3.8.06 to 3.9.00 (#6735) Bump org.beryx.jlink from 2.21.1 to 2.21.2 (#6732) Add testing interface, including a set of capabilities to tests for (#6687) Fix pasting on mac and linux (#6419) Add validation of "AUTHORS" file (#6722) Squashed 'src/main/resources/csl-styles/' changes from cacc4ee..827b986 New Crowdin updates (#6721) Add missing AUTHORs Fix for issue 6639 (#6719) Fix more links Fix link New Crowdin updates (#6718) ...

PR #6313 caused the double pasting issue on MacOS (see #4699)
After the first paste, the Edit Action focusOwner did somehow trigger on Mac and this resulted in executing paste twice.
Fixes #4699.