Kavita+ Tweaks (#2595)

This commit is contained in:
Joe Milazzo 2024-01-09 16:04:25 -06:00 committed by GitHub
parent e21144bf6b
commit 3dcf7750f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 501 additions and 414 deletions

View file

@ -84,12 +84,19 @@ export class BookLineOverlayComponent implements OnInit {
const selection = window.getSelection();
if (!event.target) return;
if ((selection === null || selection === undefined || selection.toString().trim() === '' || selection.toString().trim() === this.selectedText)) {
if (this.selectedText !== '') {
event.preventDefault();
event.stopPropagation();
}
this.reset();
const isRightClick = (event instanceof MouseEvent && event.button === 2);
if (!isRightClick) {
this.reset();
}
return;
}