Kuacha giza-mode anaweka kutua kama maandishi yasiyoonekana katika mtunzi

Fixkamo-internal
Shipped
6 Agosti 2026, 00:04 UTC
Author
kamo
Commit
a179850

Copying an answer out of ChatGPT (or any dark-themed page) and pasting it into the compose body produced a large white block with nothing in it, and the message went out that way too. Quill's stock clipboard copies the source document's inline color and background-color straight through (matchAttributor), and Chrome serialises the *computed* colours of a copied selection. ChatGPT's dark background is painted by an ancestor outside the selection, so the fragment arrives as `color: rgb(236,236,241)` with `background-color: rgba(0,0,0,0)` — near-white text with nothing behind it. The paragraphs keep their height, hence a blank block rather than obviously-missing content. Add a legibility guard that judges a pasted colour against the surface it will actually be painted on and inverts its lightness when it cannot be read, so a pasted palette keeps its hue relationships instead of being flattened. Colour and background are judged as a pair, so white-on-slate survives whole; the canvas is the template's nearBgColor, so white text on a dark template is correctly left alone. Applied in three places: as clipboard matchers when the paste lands, over seeded content (drafts saved before this, or a reply quoting a dark-themed newsletter) so the member can proof-read, and again at send time so nothing leaves unreadable regardless of how it got into the body. Other defects found on the same paste path: - a blob: image copied from another tab had its src rewritten to `//:0` by Quill and kept width="1024" — a permanently broken 1024px box. Dropped now, and oversized images clamp to 600px with height removed to hold the ratio. - a pasted table's header row collapsed into a single cell, because Quill has no <th> blot. Header cells now split correctly. - tables reach the recipient with cell borders and padding instead of as one undivided block, and code blocks get an explicit colour against their panel. - rgba(0,0,0,0) noise is shed (unreliable in older Outlook). - Ctrl/Cmd+Shift+V pastes as unformatted text. jsdom added as a devDependency for the DOM-level tests.

All changes

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei