Skip to content

[BUG] editor view doesn't work in release in Flutter web #591

@faFrafa

Description

@faFrafa

Describe the bug
It works well in local development mode, but when deploying the release build, the editor appears broken.
Build cmd is the usual:
flutter build web --target=lib/main.dart

The issue appears in both Flutter versions below:
Flutter 3.35.7
Flutter 3.32.4

To Reproduce
No idea, because everything works in development mode, but here's the code:

HtmlEditor(
  controller: _htmlController,
  htmlEditorOptions: HtmlEditorOptions(
    hint: "Enter news here...",
  ),
  htmlToolbarOptions: HtmlToolbarOptions(
    toolbarPosition: ToolbarPosition.aboveEditor,
    toolbarType: ToolbarType.nativeScrollable,
    defaultToolbarButtons: [
      FontSettingButtons(fontName: false, fontSizeUnit: false),
      ColorButtons(),
      ListButtons(listStyles: false),
      ParagraphButtons(textDirection: false, lineHeight: false, caseConverter: false),
      InsertButtons(video: false, audio: false, table: false, hr: false, otherFile: false)
    ]
  ),
  callbacks: Callbacks(
    onInit: () {_htmlController.setText(widget.news?.body ?? "");},
    onFocus: () { FocusScope.of(context).requestFocus(FocusNode()); _htmlController.setFocus(); },
  ),
  otherOptions: OtherOptions(
    height: 350,
  ),
),

Expected behavior
Release build working as in development mode.

Screenshots
In local development appears Ok:
Image

In release mode it's broken:
Image

Device:
Flutter web

Additional context
Same behaviour in Chrome, Firefox, Safari.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions