TF-4142 Close link overlay when click email content view

This commit is contained in:
dab246
2025-11-10 12:39:00 +07:00
committed by Dat H. Pham
parent 249520b711
commit fa0ba5d689
8 changed files with 70 additions and 1 deletions
+14
View File
@@ -405,4 +405,18 @@ class HtmlInteraction {
}
</script>
''';
static String scriptsHandleIframeClickListener(String viewId) => '''
<script type="text/javascript">
document.addEventListener('click', function (e) {
try {
const payload = {
view: '$viewId',
type: 'toDart: iframeClick',
};
window.parent.postMessage(JSON.stringify(payload), "*");
} catch (_) {}
});
</script>
''';
}