Skip to content

Cross-page text selection fails when paragraph spans multiple pages (split blocks) #1699

@blyzmaksim

Description

@blyzmaksim

Type

  • Bug

Description

When using pagination mode, text selection via click-and-drag works correctly between distinct paragraphs on different pages, but fails when trying to select across a split block (a single paragraph that spans two pages).

Current Behavior

  • The selection sticks at the bottom of Page 2
  • The highlight does not extend into Page 3
  • Auto-scroll during drag does not trigger because the selection position has not changed

Note: Selection works correctly between distinct paragraphs on different pages.
The issue only occurs with split blocks (a single paragraph spanning two pages).

Expected Behavior

  • The text selection should smoothly extend from Page 2 into Page 3
  • All text in the drag path should be highlighted
  • Auto-scrolling should occur if necessary

Steps to Reproduce

  1. Initialize SuperDoc with pagination: true
  2. Create or open a document with a long paragraph that naturally spans from Page 2 to Page 3
  3. Click at the beginning of that paragraph on Page 2
  4. Hold the mouse button and drag downward to select text
  5. Continue dragging across the page break into Page 3

SuperDoc Version

1.3

Browser & Version

Chrome 120

OS

MacOS 15.5

Additional Context

Image

This issue also appears on the Superdocs website demo!

Checklist

  • Tested with latest version
  • Checked for duplicates
  • Added relevant labels

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions