Skip to content

fix(editor): resolve disabled send button and webview scripting on android release builds#20

Merged
rathlinus merged 1 commit into
bulwarkmail:mainfrom
arnauda-gh:fix/android-webview-release-editor
Jul 19, 2026
Merged

fix(editor): resolve disabled send button and webview scripting on android release builds#20
rathlinus merged 1 commit into
bulwarkmail:mainfrom
arnauda-gh:fix/android-webview-release-editor

Conversation

@arnauda-gh

@arnauda-gh arnauda-gh commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Resolves the issue where Android Release builds block the rich text editor's inline script evaluation when loaded via raw HTML strings.

Key Changes:

  1. Local Assets Bundle: Packaged editor.html directly into Android's native asset directory (android/app/src/main/assets/editor.html). Loaded using file:///android_asset/editor.html on Android, granting it local secure file origin privileges.
  2. Bridge Polling: Added polling inside the WebView asset script to safely wait for the React Native bridge (window.ReactNativeWebView) to be ready before firing a 'ready' event.
  3. Dynamic Initialization: On receiving the 'ready' message in React Native, we call window.__rne.init() to dynamically inject the color themes, placeholder text, and initial HTML document body.
  4. Recipient Parsing: Cleaned up recipient string parsing logic in ComposeScreen to properly handle name/email brackets.

Fixes #19

!! WARNING !! Note that this code was AI generated. It gives great results but I don't have good practice and experience in reactjs. So I don't have the capacity to give a good judgement about the proposed solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: RichTextEditor WebView script execution blocks / postMessage fails on Android release builds

2 participants