Closed Bug 2000899 Opened 7 months ago Closed 1 month ago

New Message or Reply or Forward does not show the relevant icon of an attached file for attachments with a space in the name

Categories

(Thunderbird :: Message Compose Window, defect)

Thunderbird 146
Unspecified
Windows
defect

Tracking

(thunderbird_esr140 unaffected, thunderbird147 affected, thunderbird148 affected, thunderbird149 affected)

VERIFIED FIXED
153 Branch
Tracking Status
thunderbird_esr140 --- unaffected
thunderbird147 --- affected
thunderbird148 --- affected
thunderbird149 --- affected

People

(Reporter: anjeyelf, Assigned: maxe)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Attached image 146.0b2-attach icon.jpg

Windows 11 OS
Beta 146.0b2
Process

  • Click on '+New Message' OR 'Reply' or 'Forward' an email
  • Click on 'Attach'
  • Select a document file of any type
  • click on 'Open'

Actual Results
Before email is sent...
Attachment is added
File name is correct
The icon normally positioned before the attchment name is missing.

Expected REsult
Before email is sent...
Attachment is added
File name is correct
The icon normally positioned before the attchment name is visible.

The following is ok:
In 'Sent' of sending address and 'Inbox' folder of received email.

  • Sent Email shows
  • paperclip 1 attachment
  • image icon name of file.jpg

Also reported in Support Forum by user on version 145.0
https://support.mozilla.org/en-US/questions/1547712

I see an icon on linux. Perhaps Windows only.

OS: Unspecified → Windows

For me with Beta 146.0b2, when replying the first attachment doesn't show the icon but subsequent attachments do. I don't have the problem with a new message or when forwarding.

Anje, Ed: How is v147 or v148 beta?

(In reply to Magnus Melin [:mkmelin] from comment #3)

Anje, Ed: How is v147 or v148 beta?

Still not right in 147, but 148 looks good.

I tested this on Daily and see it too but only on attachments with a space in the name like on Attachment 9527453 [details].

I tried the same on ESR (v140) there it works. The difference is that ESR uses src instead of srcset for the icon. I copied the srcset from Daily and inserted it in ESR and the icon was still shown. So something must have changed in the decoding of the srcset (or moz-icon?)as I see the :-moz-broken on this icon with Daily.

Summary: New Message or Reply or Forward does not show the relevant icon of an attached file. → New Message or Reply or Forward does not show the relevant icon of an attached file for attachments with a space in the name

The issue seems to be the format of the srcset attribute:

srcset="
moz-icon://a b.txt?size=16&contentType=null&scale=1 1x,
moz-icon://a b.txt?size=16&contentType=null&scale=2 2x,
moz-icon://a b.txt?size=16&contentType=null&scale=3 3x"

If I remove the space in a b.txt, it works. Maybe URL-encode the filename?

Attached image missing-icon.png

The issue is not only on the message attachments, it also happens elsewhere, like in the list of downloads.

We should really move the logic to a shared helper instead of duplicating it a bunch of times, by far not the only place potentially affected.

Assignee: nobody → mozilla
Status: NEW → ASSIGNED

Pushed by edicharry@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/fe142fe18806
Ensure attachment icons for filenames with spaces render on Windows using a new shared helper. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED

Thanks for fixing!

Status: RESOLVED → VERIFIED
Target Milestone: --- → 153 Branch
Duplicate of this bug: 2050112
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: