From d6711ba93b661f4619de350d3a3fd391eeab796d Mon Sep 17 00:00:00 2001 From: dab246 Date: Mon, 31 Mar 2025 10:27:07 +0700 Subject: [PATCH] TF-3601 Add `adr` for issue fix iOS email view gone blank with large HTML content Signed-off-by: dab246 --- ...view-gone-blank-with-large-html-content.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/adr/0058-fix-ios-email-view-gone-blank-with-large-html-content.md diff --git a/docs/adr/0058-fix-ios-email-view-gone-blank-with-large-html-content.md b/docs/adr/0058-fix-ios-email-view-gone-blank-with-large-html-content.md new file mode 100644 index 000000000..b76947317 --- /dev/null +++ b/docs/adr/0058-fix-ios-email-view-gone-blank-with-large-html-content.md @@ -0,0 +1,27 @@ +# 58. Fix iOS email view gone blank with large HTML content + +Date: 2024-04-05 + +## Status + +- Issues: + - [iOS Email view gone blank with large HTML content #3601](https://github.com/linagora/tmail-flutter/issues/3601) + +## Context + +- On iOS, when using an `InAppWebView` inside a `SingleChildScrollView`, the height of the `SingleChildScrollView` depends on the `InAppWebView`. +Continuously updating the height of the `InAppWebView` up to a certain limit can cause the `SingleChildScrollView` to fail to render, +resulting in the content of the `InAppWebView` not being displayed. + +## Decision + +- Workaround: + +Set the maximum display height for content on iOS to `22,000` (not an absolute limit, but verified across various emails and found to be the most reasonable value). +If the email content exceeds this height, a `View entire message` button will be displayed at the bottom of the email. +When users click this button, they will be able to view the full email content, similar to previewing an EML file. + + +## Consequences + +- All emails display fine on iOS