Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Pasting text that also carries an image drops the text

クローズ 初心者向け
#175 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
desktop

調査の方向性

src/renderer/src/views/composer.ts:307-337 の貼り付けハンドラーから始め、clipboardData.files と text/plain の処理を確認してください。テキストと画像の両方を含むクリップボードの内容で再現し、テキストが入力欄に届くことと、画像の動作が引き続き適切であることを確認してください。混在した内容を貼り付けてもテキストが失われなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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();
主要言語
TypeScript
スター
2
フォーク
2
平均マージ
8時間 28分
マージ済み PR(30日)
26

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PierrunoYT/patch のほかの issue

PierrunoYT/patch の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。