@@ -228,13 +228,6 @@ export class ReaderEventService {
|
||||
this.handleTouchEnd(event, doc);
|
||||
}, {passive: false});
|
||||
|
||||
doc.addEventListener('contextmenu', (event: MouseEvent) => {
|
||||
const selection = doc.defaultView?.getSelection();
|
||||
if (selection && !selection.isCollapsed) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
doc.addEventListener('selectionchange', () => {
|
||||
this.handleSelectionChange(doc);
|
||||
});
|
||||
|
||||
+4
@@ -107,6 +107,10 @@ export class ReaderSelectionService {
|
||||
|
||||
if (action.type === 'select') {
|
||||
this.clearPreview();
|
||||
if (this.currentSelection?.text) {
|
||||
navigator.clipboard.writeText(this.currentSelection.text);
|
||||
}
|
||||
this.viewManager.clearSelection();
|
||||
this.emitState();
|
||||
} else if (action.type === 'search' && action.searchText) {
|
||||
this.clearPreview();
|
||||
|
||||
Reference in New Issue
Block a user