SimpleMachines / SMF

Simple Machines Forum — SMF in short — is free and open-source community forum software, delivering professional grade features in a package that allows you to set up your own online community within minutes!
https://www.simplemachines.org/
Other
596 stars 255 forks source link

[2.1] & [3.0]: BBC img tag quirk: width scales if specified, but height does not in mobile view #8310

Open sbulen opened 2 months ago

sbulen commented 2 months ago

Basic Information

When you have a large image, with width & height specified in the img tag, everything scales pretty good on desktop. Things get a little unpredictable on smartphones, though, or, when zooming in a significant amount on desktop.

The problem is that if the pic is too big to fit, width scales accordingly, but height does not... So specifying a height on a large image results in lots of deadspace above & below the image on mobile:

image

Best workaround I can find is to simply never use "height=" in img bbc.

Not sure what the fix is... If for nothing else, this is for awareness that wierdness happens when height is specified.

Steps to reproduce

  1. Insert a large image, 1000x800 or larger, specifying height & width.
  2. View it on mobile.

Expected result

If width is scaled for whatever reason, height should be scaled the same amount.

Actual result

Upon zooming, window-resizing, or mobile usage, width scales, but height remains constant.

Version/Git revision

3.0 Alpha 2 & 2.1.4

Database Engine

All

Database Version

8.4

PHP Version

8.3.8

Logs

No response

Additional Information

No response

sbulen commented 2 months ago

Same content above, but height removed from the img tag:

image