mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-29 18:22:37 -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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user