Skip to content

[Bug]: Copying images to clipboard does not work on Windows 11 #672

Open

Description

@TheLejen

Preflight Checklist

  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

OpenComic Version

2.0.0

Operating System

Edition Windows 11 Pro Version 26H2 Installed on ‎1/‎26/‎2025 OS build 26300.9974 Experience Windows Feature Experience Pack 1000.26100.385.0

Installed via

.exe

Steps to reproduce

Test 1: CBZ files

  1. Open OpenComic on Windows 11.
  2. Open a .cbz comic book.
  3. Navigate to any page.
  4. Try copying the page using either of the following methods:
  • Use the assigned keyboard shortcut (hotkey) for copying the image to the clipboard.
  • Right-click on the page and select Copy Image to Clipboard.
  1. Check what's inside your clipboard.

Both methods produce the same result: nothing new is copied to the clipboard.

For comparison, open the exact same .cbz file in SumatraPDF, copy the same page, and paste it into another application or check your clipboard using Win+V. This works as expected.

Test 2: EPUB files

  1. Open an .epub file containing at least an image with OpenComic.
  2. Try copying some text from a page. Text-copying works correctly.
  3. Try copying an image from the same or another page, using the context menu.

Text is copied successfully, but images are not transferred to the clipboard.

Expected Behavior

Images should be successfully copied to the Windows system clipboard.

Actual Behavior

OpenComic does not appear to transfer images to the Windows clipboard.

This behavior is consistent across both CBZ and EPUB files and does not depend on how the copy command is triggered:

  • Using the assigned keyboard shortcut does not work.
  • Using right-click => Copy Image to Clipboard does not work.
  • Copying text from EPUB files works correctly.
  • Copying the same CBZ page using SumatraPDF works correctly.

This suggests that the issue may be related to OpenComic's image-to-clipboard implementation rather than a general Windows clipboard malfunction.

Error message

No response

Additional Information

I also took a look at the relevant parts of the source code:

  • templates/reading.elements.menus.html invokes reading.contextMenu.copyImageToClipboard().
  • scripts/reading/context-menu.js implements the copyImageToClipboard() function. It creates a canvas, converts it into a NativeImage using electron.nativeImage.createFromDataURL(), and then calls electron.clipboard.writeImage().

Could you investigate whether this implementation is working correctly on Windows 11, particularly the final step of writing the generated NativeImage to the system clipboard?

One potentially relevant detail is that the current master branch uses Electron 45, whereas Electron 44 and later no longer expose the clipboard module directly to renderer processes. It may be worth checking whether the current implementation accounts for this API change.

Sample file

No response

Activity

  1. mateuscmtropical commented on Nov 20, 2026

    @mateuscmtropical
    Contributor

    Hi, I'd like to work on this one.

  2. mateuscmtropical commented on Nov 20, 2026

    @mateuscmtropical
    Contributor

    Hi, I've opened a PR for this: #674

  3. added this to the v2.0.1 milestone on Nov 20, 2026
  4. reopened this on Nov 20, 2026
  5. ollm commented on Nov 20, 2026

    @ollm
    Owner

    I've already merged @mateuscmtropical fix.

    Please note that images from epub files cannot currently be copied (Unless the Extract document images option is enabled).

    If you'd like to try the fix, you can install a nightly build.

    Nightly builds: ollm/OpenComic-Nightly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions