Copy-Paste does not work

Bug #1477696 reported by Dmitry on 2015-07-23
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

Latest version of Caliber 2.32.1 for (also some previois ones has the same problem) - copy paste does not work.
It is Windows 7 x64. When I select a text in a book with a mouse and then right-click it and click "Copy" it does nothing!
Nothing appears in Windows clipboard. So, it is not possible to copy any text from a book.
Book format does not matter, I tried EPUB and Fb2 - clipboard does not work at all! :-(

Could you please fix it? Because it looks very bad - I cannot copy even single word from a book which is very silly experience for computer. I need to copy a cite and insert into my article. I do not want to re-type lot of text manually!
Please fix it.

Hardware/OS: Intel Core-i5/Windows 7 Ultimate x64, clipboard is standard (I do not use any keyboard of clipboard enhansers)

Caliber version: 2.32.1

Steps:
1) open book (in my case George Orwel "1984".
2) scroll to some page (let say #10)
3) select 2-3 lines of text
4) right-click selected text, click "Copy"
5) switch to MS Word (or Notepad), click Paste - nothing happened

I cannot replicate this copying from the viewer works fine on my windows
7 x64 machine. You likely have something on your computer interfering
with the clipboard, either an overzealous antivirus program or a
clipboard manager of some kind.

 status invalid

Changed in calibre:
status: New → Invalid
Dmitry (dima-ben) wrote :

I already mentioned that I'm not using any keyboard or clipboard enhancers (no managers, no any software which controls it).
Antivirus is quite standard - ESET NOD32.
Also - all other software (microsoft office 2010, notepad, etc) perfectly works with clipboard.
Which means - there is bug in Calibre!

Please change status back to Valid bug.
Because it is very serious problem in your software.

Please see - when all other software works fine with clipboard but only Calibre has problem. That precisely means - BUG IS EXACTLY IN CALIBRE.

Please check/review your code which works with clipboard - you may find a bug there.

Dmitry (dima-ben) wrote :

Btw, if you need some debug logging or short remote session to check it on my PC (up to 10-20 minutes) I'm ready to help.

And please do not be so quick to tell "problem does not exists" because for sure it does exist.
I remember I had similar problem with GDI printing API in my application. There were all valid API calls which were working fine in most cases but for some printers it fail. It was required some investigation from my side until I realized how to fix that.
I think it could be something like that in this case also.

Dmitry (dima-ben) wrote :

Also a reason - even if there is "conflicting software" that is a virtue of author/programmer to resolve conflict from his side first without waiting for "world change".

Kovid Goyal (kovid) wrote :

Sigh, the copy to clipboard code in the viewer is literally five lines of absolutely trivial code, go see for yourself: https://github.com/kovidgoyal/calibre/blob/master/src/calibre/gui2/viewer/documentview.py#L687

Feel free to find the bugs in that. Or perhaps you want to argue that the bug is in Qt, the graphics toolkit that calibre uses, if so, then feel free to open a bug report with them.

zzgorme (gregorme) wrote :

Apparently this is not a bug, it is a feature. If you select some text in the calibre viewer you can right click and select "inspect". There you can select disable javascript, then the clipboard works again. I suppose this is to stop copying and pasting for copyright reasons.

It isn't a feature either. Copy-paste works for most people, without
disabling javascript.

If javascript is disabling the copy-paste, it isn't coming from calibre.
And EPUBs themselves aren't really supposed to have javascript anyway
(maybe EPUB3 but calibre doesn't support EPUB3).

Dmitry (dima-ben) wrote :

Anyway, it is still does not work in my case!

I tried the same scenario on difference computers and on devices with different versions of Caliber - it has exactly the same effect everywhere!
Copy-paste DOES NOT WORK AT ALL. :-(

So, I installed screen OCR and recognizing text from screenshots. Unfortunately, that is only the option left when author of program is "not believe in this bug".

zzgorme (gregorme) wrote :

There is a workaround for this. Select the text, then right hand click and select search online for "". This will open your text in the browser search window, it has a limitation on how much you can do at a time though. Then you copy back from the search window to paste where you want. If this is not long enough then you keep doing parts of the text until you get it all this way. This never seems to fail though copy and paste works randomly, sometimes turning off javascript works and other times it doesn't.

llyao (llyao) wrote :

I think I have found some clue about the problem.

I encountered this problem too.

Even time after the reboot of my computer,opening the calibre viewer only,the copy function is fine.But if I opened a browser,no matter it is Chrome or Edge,the copy function seem does not go right.I can't ctrl+c or highlight-rightclick to copy,but the copy icon from the toolbar is still work.

firen (firenleon) wrote :

win7 x64
had the same problem.
sigh

zzgorme (gregorme) wrote :

The easiest solution is to go back to version 1.48 in x64, the copy and paste always works then. Maybe they can see what they did differently after that.

Duncan (thatguyduncan) wrote :

I experience the same. Windows 10, x64, calibre 2.75.1.

    CTRL-C does not work.
    Right-click and "copy" does not work.
    Toolbar icon works (only tried once after reading this thread).

As with OP, you can reach out for additional information / logged data.

Duncan (thatguyduncan) wrote :

One point of interest -- when I use CTRL-C at home (Windows 10 64), it does not work. When I use CTRL-C at work (Windows 7 64), it works fine.

Changed in calibre:
status: Invalid → Confirmed
Eli Schwartz (eschwartz) wrote :

And once again, without a way to duplicate the bug there is nothing
Kovid can do. He cannot even verify that the bug exists -- all there is
is your and a couple other peoples' say-so. And no matter how
sympathetic I am to your issue, I think it is still undeniable that
there is nothing Kovid can do about a bug he cannot witness for himself.

It is pretty simple code, so if there is a bug it is likely in Qt. But
reliably proving it will be a challenge.

So unless you have new information of a type that is actually useful for
debugging purposes, please don't go re-opening bugs that were closed for
a reason. Your switch to "confirmed" is wrong anyway, since Kovid still
hasn't confirmed the bug exists...

Feel free to click the other button, that says "This bug affects 2
people. Does this bug affect you?" Invalid bugs can still affect you too.

 status invalid

Changed in calibre:
status: Confirmed → Invalid
goletto (caljammi) wrote :

Hello Kovid and everyone;

Please excuse me I am French I did not fully understand the recommendations of Eli Schwartz (eschwartz) about the Forum.

For my part
with WIN7 64 and Calibre 2.79 (64) I have the bug since always but randomly:
1 ° / it does not depend on browser open or not
2 ° / it does not depend on what is the open book
3 ° / the button "copy" of the tool bar works at 100% always
4 ° / the "copied" of the right click of the mouse it depends on the days but I would say that at 60/80% of the time it does not work.

I have also done tests by opening and closing Calibre and restarting my system and opening the word processors first (before Calibre) or after calibre, nothing changes, when it does not copy with the help of the mouse it does not paste on any support.

I think we need to continue testing and we will be able to discern what is common to all who have the bug.
This is probably a conflict but we probably thousands to have this problem.

We have to help Calibre as calibre helps us

Forgive my bad English
 see you soon

goletto (caljammi) wrote :

Please excuse me
I did not specify:
always when the copied-paste mouse does not work
that of Ctrl + C and Ctrl + V either

and obviously this only happens in Calibre

Your past gave me an idea. This might fix it, I have no way to be sure,
since I cannot reproduce the bug, but...

https://github.com/kovidgoyal/calibre/commit/0a45fa19afedea870b5f6bfd6278b0686c357886

goletto (caljammi) wrote :

Hello;
Thank you Kovid for your code modification but I do not know how we can integrate it into the Calibre viewer program. because I would not want to upgrade my version of Calibre to a later one. (I tried but I have a machine with four screens, two of which are not wide HD and I have big display problems by changing version )

The copied-pasted mouse problems have always happened on EPUB because I only read this basically (I prefer PDF-Viewer for my very rare PDF)

Since 4 days the copy-paste of the mouse did not work, today NEW TEST, I specify that I never did before this test:
ATTENTION this is maybe the chance I mentioned at the beginning, so I repeat this test after each period when the mouse no longer works to copy.

So:
I open an EPUB directly from my book stock, it obviously opens in the Calibre viwerer without launching Calibre;
There the copied paste of the mouse works perfectly!
AFTER I launch Calibre and on all my EPUB opened with Calibre and whose extracts did not paste the previous days, the copied-pasted mouse works perfectly;

I do not know if that confirms any suspicion?
See you soon

Kovid Goyal (kovid) wrote :

Turn off Preferences->Look & feel->Adjust for high resolution screens

and you should be able to use newwer calibre versions just likel older ones.

goletto (caljammi) wrote :

Hello and thank you for your precision Kovid.

To pass without anxiety from V.2.79 to V.3.16;
I am going to search the forums how to be certain to recover all my preferences, libraries, series, labels etc .. and also the adjustments and additions made by lines of code found on the forums.

Given two anti-virus, and a very heavy machine, where the Roaming is reported on the 24th disc "Z" my "System Restorations do not always work". Would you know if there are specific folders to back up to recover for sure what I just mentioned if I had to reinstall V.2.79

In version 2.79.0, option "Interface and presentation" - "Main interface" I do not have the option that you quote Kovid for screens H.D., I suppose it is in version 3.16.0

So I think that the modification of code to copy it paste of the mouse is directly integrated with this version 3.16 it is correct?
Or should we download the new version on a specific link in order to benefit from this code change test?

I am a bit out of the original subject, but it is in order to recover your code modification of the copy-pasted
Thank you very much.

Kovid Goyal (kovid) wrote :

You have to wait till the next release for this code to be available.

zzgorme (gregorme) wrote :

I am still using 1.48 which works fine with copy and paste, it never fails. I was told this was OK so I haven't updated it. To fix this problem you need to look at what changed after that version which might have affected copy and paste. Someone must have broken something after that and not realized what it was.

goletto (calijammi) wrote :

Hello Kovid; Hello everyone
A month and a half ago that I wanted to thank you because with the version 3.19, finally the copy-paste works.
It is the UBUNTU website that has a bugue blocking the entry, (with good Mail, good Id and good Pass!) I had to create a new account, it was always impossible to come.
I'm going to make a post explaining that UBUNTU ONE addresses an email address validation link that's wrong!
It will never work, they forgot to integrate the address at the end of the link.
We must copy the link by adding the address itself at the end and paste it into a browser.
Now my name is no longer
"goletto (caljammi)" but "goletto (calijammi)"
See you soon

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers