mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
E-book viewer: Fix copy to clipboard not ignoring text from elements that are marked as non user selectable. Fixes #1991504 [Copy text does not respect user-select: none](https://bugs.launchpad.net/calibre/+bug/1991504)
Apparently the bug in webengine where it does not copy HTML to the clipbaord is no more, so we can go back to relying on the native copy which does exclude such text automatically.
This commit is contained in:
parent
eebdd57a90
commit
a1d2209fc7
@ -951,12 +951,11 @@ class IframeBoss:
|
||||
select_crw(crw)
|
||||
|
||||
def copy_selection(self):
|
||||
if not runtime.is_standalone_viewer:
|
||||
try:
|
||||
if document.execCommand('copy'):
|
||||
return
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if document.execCommand('copy'):
|
||||
return
|
||||
except:
|
||||
pass
|
||||
|
||||
s = window.getSelection()
|
||||
text = s.toString()
|
||||
|
Loading…
x
Reference in New Issue
Block a user