Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/BookReader/Mode2UpLit.js
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,15 @@ export class Mode2UpLit extends LitElement {

if (ev.which != 1) return;

// Don't flip the page if the user is completing a text-selection
// drag. The page-flip handler runs on `mouseup`, so releasing the
// mouse at the end of a selection would otherwise trigger
// `br.left()` / `br.right()` and clobber the selection. The text
// selection plugin's own mouseup handler stops propagation when the
// mouseup lands on a word, but not when it lands in blank space
// between words or on the page margin.
if (window.getSelection?.()?.toString().trim()) return;

const $page = $(ev.target).closest('.BRpagecontainer');
if (!$page.length) return;
if ($page.data('side') == 'L') {
Expand Down
Loading