diff --git a/booklore-ui/src/app/features/readers/ebook-reader/core/event.service.ts b/booklore-ui/src/app/features/readers/ebook-reader/core/event.service.ts index 5294d8fdd..8b88bbbb9 100644 --- a/booklore-ui/src/app/features/readers/ebook-reader/core/event.service.ts +++ b/booklore-ui/src/app/features/readers/ebook-reader/core/event.service.ts @@ -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); }); diff --git a/booklore-ui/src/app/features/readers/ebook-reader/features/selection/selection.service.ts b/booklore-ui/src/app/features/readers/ebook-reader/features/selection/selection.service.ts index 0b4d24979..117efbc6f 100644 --- a/booklore-ui/src/app/features/readers/ebook-reader/features/selection/selection.service.ts +++ b/booklore-ui/src/app/features/readers/ebook-reader/features/selection/selection.service.ts @@ -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();