thunderbird-android icon indicating copy to clipboard operation
thunderbird-android copied to clipboard

<meta name="viewport"> is missing initial-scale=1

Open Djfe opened this issue 2 years ago • 4 comments

Checklist

  • [X] I have used the search function to see if someone else has already submitted the same bug report.
  • [X] I will describe the problem with as much detail as possible.

App version

6.7.10

Where did you get the app from?

Other

Android version

13

Device model

Pixel 7 Pro

Steps to reproduce

example mail This bug affects all mails of the same sender.

Expected behavior

grafik

Actual behavior

K-9 (Sanitizer) adds this meta tag which breaks the layout of the mail above <meta name="viewport" content="width=device-width">

grafik

Logs

No response

Djfe avatar Sep 08 '23 09:09 Djfe

Possible fix? <meta name="viewport" content="width=device-width, initial-scale=1"> It fixes the behavior in Firefox atleast. eml attached: open with "hg" eml-1.zip

Djfe avatar Sep 08 '23 09:09 Djfe

I just noticed, that the mail already comes with <meta name="viewport" content="width=device-width,initial-scale=1"> in the header section. K-9 adds the same meta tag, so it exists twice. The 2nd one appear to take precedence.

K-9 could remove the first meta tag viewport and replace it fully, depend's on what's best (no idea)

Djfe avatar Sep 08 '23 10:09 Djfe

The viewport meta tag <meta name="viewport" content="width=device-width,initial-scale=1" /> seems to be the good one following https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Responsive_Design#the_viewport_meta_tag

jpggithub avatar Feb 10 '24 07:02 jpggithub

html mail is a mine-field. I cannot assume that introducing initial-scale=1 won't break any existing mail layouts. There are no guide-lines for what works or doesn't work in mail clients across the world. html mail isn't exactly standardized/enforcing standards. Often mails still use tables for layout, responsive layouts is like chasing dreams. html mail is the stone ages + modern stuff + hacks to make mails display correctly in certain clients.

Adding initial-scale=1 to all mails could improve other mails but also break their layout. I haven't done any tests. Important for me would be that the sanitizer atleast respects the viewport meta tag that a mail comes with in-order to not break it's layout. If it doesn't have one it could add it's own one to the DOM.

Djfe avatar Feb 10 '24 09:02 Djfe