Summernote only binds Tab to list nesting when tabDisable is set, and even
then it inserts spaces. Register a keydown handler on the web editor that:
- delegates Tab / Shift+Tab inside a list item to the Summernote
indent / outdent commands (same as the toolbar buttons);
- outdents an empty nested list item on Enter instead of leaving the list,
like Gmail. Enter on an empty top-level item still exits the list.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The EML preview renders the mail content in the same document as the
app-generated header (subject, sender, recipients, date), so global mail
rules such as '* { font-family: ... !important }' restyled that header.
Wrap every mail <style> into '@scope (.email-body) { ... }'. A CSS
tokenizer neutralizes any '}' that would close the @scope block early,
honoring comments, strings, escapes and url() tokens, and drops the CSS
when unicode-range tokenization differs between browsers.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Links inside the EML preview opened new windows/tabs with plain
window.open, with no noopener and no scheme check. Pass
noopener,noreferrer and only open http, https and mailto targets.
Add ExternalLinkPolicy (http/https/tel allow-list) and route the mobile
email WebView's external-navigation handler through it, refusing the
app's own custom schemes so a link in received content can no longer
relaunch another app or the app itself.
The EML / full-message preview and the print page build their header
as an HTML string. Subject, sender, recipients, date, attachment names
and the attachment link were inserted unescaped, so a crafted header
value became markup in a same-origin page.
DownloadManager.openDownloadedFileWeb loaded pdf.js/pdfobject from a
CDN and put the file name unescaped into a blob page. Nothing calls it.
PreviewEmlFileUtils and PrintUtils escape every text field at the sink.
Callers pass raw strings and no longer pre-escape them. The attachment
link is attribute-escaped and built with Uri, so file names survive the
round-trip. The inline-image alt and id attributes are attribute-escaped.
openDownloadedFileWeb, its CDN loaders and js_interop_stub.dart are
removed, and DownloadManager no longer takes DeviceInfoPlugin.
When a received email contains an inline attachment with a CID but no
matching img[src="cid:..."] in the HTML body, tmail previously hid it
completely — not shown in the body (no img tag) and not in the attachment
panel (isOutsideAttachment returned false due to hasCid+isDispositionInlined).
In GetEmailContentInteractor, extract referenced CIDs from the raw HTML
before transformation, then split allInlineImages into referenced (rendered
in body) and orphaned (no body reference). Orphaned attachments are promoted
to the attachment panel so users can see and download them.
- Button was not added in MobileResponsiveAppBar
- Mobile behavior related scripts were not correctly added for web composer
- Mobile behavior related scripts return value was not properly handled for web composer
- In responsive web, bottomsheet modal clicks were intercepted by iframe behind
- Add getSavedSelection to check saved selection without consuming it
- Distinguish between setText (replace all) and insertText (at cursor) operations
- Fix replace callback to use setText when no selection exists
- Clean up saved selection state after restoration in HTML utils
- Move mobile editor focus and selection restore to appropriate callbacks
- Fix Scribe replace on mobile when opened from menu bar (to be complete
this fix needs this PR https://github.com/Enough-Software/enough_html_editor/pull/37)
- Ensure all mobile editor call are awaited
- Do not clear text if a selection has been restored (which mean we replace a selection)
- Avoid collapseToEnd crash
When opening Scribe mobile modal, we now unfocus the composer to hide the keyboard and the selection start and end icons from the OS.
Add new methods to save, restore, and clear text selection in HTML editor. These methods allow preserving and restoring user selection state when opening the Scribe mobile modal so that the "replace" action still works.
Because the HTML editor is different, we need a different selector to get the editable element.
We also need to add a small offset to the coordinates to avoid positionning the overlay icon above native selection UI in mobile. For example, Android adds a marker at the beginning and the end of the selection and we do not want to display the Scribe overlay icon above this marker.