mail icon indicating copy to clipboard operation
mail copied to clipboard

Message preview iframe resizes unexpectedly without user interaction in Safari

Open PeViz opened this issue 7 months ago β€’ 8 comments

Steps to reproduce

Bug description

When opening an HTML email in Nextcloud Mail, the message preview iframe initially renders at a small size (text appears small, content fits without scrollbar). Shortly after, without any user interaction, the iframe resizes to full content height β€” making the preview much larger and requiring a scrollbar to read the message. The rest of the page (sidebar, toolbar) remains unaffected; only the message preview iframe changes size.

This behavior is reproducible consistently. It appears to be related to a delayed response from iFrameResizer / htmlresponse.js β€” the iframe first renders at its default size, and only after the resizer script communicates the actual content dimensions does it expand.

Steps to reproduce

  1. Open Nextcloud Mail in Safari
  2. Click on any HTML email in the message list
  3. Observe the message preview panel on the right β€” it initially loads at a small size
  4. Wait 1–3 seconds without doing anything
  5. The preview iframe automatically grows to full content height, requiring a scrollbar

Expected behavior

The message preview iframe should render at the correct size immediately upon opening, without a visible resize jump.

Actual behavior

The iframe first appears small (compressed view), then without user interaction resizes to full height. This causes a jarring visual jump and makes the preview unusable until the resize completes.

Mail app version

5.7.12

Nextcloud version

33.0.2

Mailserver or service

Dovecot

Operating system

MacOS, Safari latest version

PHP engine version

Other

Nextcloud memory caching

No response

Web server

Apache (supported)

Database

MariaDB

Additional info

sudo -u apache php /var/www/html/nextcloud/occ config:list system { "system": { "instanceid": "REMOVED SENSITIVE VALUE", "passwordsalt": "REMOVED SENSITIVE VALUE", "secret": "REMOVED SENSITIVE VALUE", "trusted_domains": [ "localhost", "REMOVED SENSITIVE VALUE", "REMOVED SENSITIVE VALUE" ], "datadirectory": "REMOVED SENSITIVE VALUE", "dbtype": "mysql", "version": "33.0.0.16", "overwriteprotocol": "https", "overwrite.cli.url": "https://nc.remak.cz", "dbname": "REMOVED SENSITIVE VALUE", "dbhost": "REMOVED SENSITIVE VALUE", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "REMOVED SENSITIVE VALUE", "dbpassword": "REMOVED SENSITIVE VALUE", "installed": true, "disable_ipv6": true, "maintenance_window_start": 1, "default_phone_region": "CZ", "serverid": 1, "memcache.local": "\OC\Memcache\APCu", "memcache.locking": "\OC\Memcache\Redis", "default_language": "cs", "redis": { "host": "REMOVED SENSITIVE VALUE", "port": 6379 }, "maintenance": false, "allow_local_remote_servers": true, "app_install_overwrite": [], "mail_smtppassword": "REMOVED SENSITIVE VALUE", "mail_smtpname": "REMOVED SENSITIVE VALUE", "mail_domain": "REMOVED SENSITIVE VALUE", "mail_from_address": "REMOVED SENSITIVE VALUE", "mail_smtpmode": "smtp", "mail_smtphost": "REMOVED SENSITIVE VALUE", "mail_smtpauth": true, "mail_smtpport": "25", "mail_sendmailmode": "smtp", "mail_smtpstreamoptions": { "ssl": { "allow_self_signed": true, "verify_peer": false, "verify_peer_name": false } }, "forbidden_filename_basenames": [ "con", "prn", "aux", "nul", "com0", "com1", "com2", "com3", "com4", "com5", "com6", "com7", "com8", "com9", "com\u00b9", "com\u00b2", "com\u00b3", "lpt0", "lpt1", "lpt2", "lpt3", "lpt4", "lpt5", "lpt6", "lpt7", "lpt8", "lpt9", "lpt\u00b9", "lpt\u00b2", "lpt\u00b3" ], "forbidden_filename_characters": [ "<", ">", ":", """, "|", "?", "*", "\", "/" ], "forbidden_filename_extensions": [ " ", ".", ".filepart", ".part" ], "defaultapp": "dashboard", "auth.bruteforce.protection.enabled": false, "ldapProviderFactory": "OCA\User_LDAP\LDAPProviderFactory" } }

PHP

PHP 8.4.20 (cli) (built: Apr 8 2026 08:16:38) (NTS gcc x86_64)

Mailserver or service

Dovecot

Database

10.11.15-MariaDB

Browser

Safari macOS 15

Server config contains 'overwriteprotocol' => 'https' and 'overwrite.cli.url' => 'https://nc.remak.cz', which are consistent. No mixed content errors observed in browser console (confirm or add Safari console output when opening a message).

Related older issues: #5863, #5032, #11008.

Image

PeViz avatar Apr 27 '26 09:04 PeViz

Could you please post a screenshot of a non-sensitive email before and after the resize so we see the problem? Thanks

ChristophWurst avatar Apr 28 '26 08:04 ChristophWurst

Image Image

PeViz avatar Apr 28 '26 11:04 PeViz

In addition to the delay issue, the bottom part of the message body is being truncated. The affected area is highlighted with a red rectangle in the attached screenshot β€” the email signature and the rest of the message are cut off and not fully displayed.

Image

PeViz avatar Apr 28 '26 11:04 PeViz

Hi there! It looks like this issue hasn’t seen much activity for a while and might need a bit more information to move forward. If we don’t hear back soon, we may close it to keep things organized. Thanks again for your contributions – we really appreciate it!

nextcloud-command avatar May 29 '26 00:05 nextcloud-command

Hi there, I sent what was requested, what else is needed?

PeViz avatar May 29 '26 04:05 PeViz

Nothing. I forgot to remove the tag.

ChristophWurst avatar May 29 '26 06:05 ChristophWurst

ok, thanks for your response

PeViz avatar May 29 '26 06:05 PeViz

Instead when I open HTML mails in latest version of app, this happens: #13160 I don't know if the two things are in some way related.

xX-MrN0b0dy-Xx avatar Jun 27 '26 10:06 xX-MrN0b0dy-Xx