Skip to content

[Bug] fix(reader): Copy button in selection popup provides no feedback and fails #400

Description

@GeraldCox

What went wrong?

When selecting text in the epub reader and tapping the copy button in the selection popup, nothing happens.

Steps to reproduce

  1. Open any book in the epub reader
  2. Select some text
  3. Tap the Copy button in the selection popup

Expected vs actual behavior

Expected behavior:
The selected text is copied to the clipboard with visual confirmation.

Actual behavior:
The button does nothing — no text is copied to the clipboard and no feedback is shown.

Root cause:
Two problems in client/src/features/reader/epub/components/SelectionPopup.vue:

  1. navigator.clipboard.writeText() silently fails over HTTP (non-HTTPS) contexts, and the error is swallowed by .catch(() => {}). There is no fallback to document.execCommand('copy') like there is in useTableKeyboard.ts.
  2. The onCopy() function emits copy immediately, which triggers selection.dismiss() in ReaderView.vue (line 635) — the popup disappears with no visual feedback that anything happened.

Your setup

  • BookOrbit version/image tag: latest
  • Deployment: Docker / Unraid
  • OS: Unraid
  • Browser: Edge (latest)

Relevant logs (optional)

Screenshots (optional)

No response

Before submitting

  • I've searched existing issues and this hasn't been reported yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleasedIssue or PR is included in a released version.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions