Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Pasting text that also carries an image drops the text

Closed Beginner friendly
#175 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
desktop

Research direction

Start with the paste handler in src/renderer/src/views/composer.ts:307-337 and check how it handles clipboardData.files and text/plain. Reproduce with clipboard content containing both text and an image, then verify the text reaches the input and the image behavior remains appropriate. Done when pasting mixed content no longer drops the text.

Written by the indexing model from the issue text.

Description

bug good first issue priority: low severity: medium

Found in the 2026-10-07 code review (the logic is confirmed in the code; whether the clipboard holds both depends on the source app).

Problem

In src/renderer/src/views/composer.ts:307-337, when clipboardData.files contains an image and images are allowed, event.preventDefault() runs and only the image is attached. The text/plain check exists only in the branch where images are blocked.

Scenario

Copying cells from Excel, or a selection from Word or a browser, puts both text and a PNG on the clipboard. With the default Claude model, pasting attaches an image and the text never reaches the input.

Fix

const hasText = event.clipboardData?.types.includes('text/plain');
if (this.imagesBlocked) { if (hasText) return; event.preventDefault(); /* notice */ return; }
if (hasText) return; // or keep the text and also attach the image without preventDefault
event.preventDefault();
Dominant language
TypeScript
Stars
2
Forks
2
Avg merge
5h 28m
Merged PRs (30d)
24

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PierrunoYT/patch

All issues in PierrunoYT/patch

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.