tneotia / html-editor-enhanced

A Flutter package that provides a WYSIWYG editor backed by flutter_inappwebview and the Summernote library.
https://pub.dev/packages/html_editor_enhanced
MIT License
269 stars 318 forks source link

[BUG] flutter web html editor used/ ScrollController has no ScrollPosition #478

Open skensobit opened 7 months ago

skensobit commented 7 months ago

Describe the bug If i click on the scrollable Dropdown Buttons on the toolbar like title... an error message appears: I use the chrome web to emulate.

To Reproduce Steps to reproduce the behavior:

  1. Go to the toolbar dropdown buttons
  2. Click on a dropdownbutton like title
  3. Scroll down to '....'
  4. See error

Expected behavior i get this failure if i click on the Dropdown: Restarted application in 454ms. Height of Platform View type: [c9yXPdCKH_f5Bg==] may not be set. Defaulting to height: 100%. Set style.height to any appropriate value to stop this message. Width of Platform View type: [c9yXPdCKH_f5Bg==] may not be set. Defaulting to width: 100%. Set style.width to any appropriate value to stop this message. done ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════ The following assertion was thrown during a scheduler callback: The Scrollbar's ScrollController has no ScrollPosition attached. A Scrollbar cannot be painted without a ScrollPosition. The Scrollbar attempted to use the PrimaryScrollController. This ScrollController should be associated with the ScrollView that the Scrollbar is being applied to.When ScrollView.scrollDirection is Axis.vertical on mobile platforms will automatically use the PrimaryScrollController if the user has not provided a ScrollController. To use the PrimaryScrollController explicitly, set ScrollView.primary to true for the Scrollable widget. When the exception was thrown, this was the stack: dart-sdk/lib/_internal/js_dev_runtime/private/ddcruntime/errors.dart 288:49 throw packages/flutter/src/widgets/scrollbar.dart 1567:9 packages/flutter/src/widgets/scrollbar.dart 1591:14 [_debugCheckHasValidScrollPosition] packages/flutter/src/widgets/scrollbar.dart 1521:14 packages/flutter/src/scheduler/binding.dart 1284:15 [_invokeFrameCallback] packages/flutter/src/scheduler/binding.dart 1223:9 handleDrawFrame packages/flutter/src/scheduler/binding.dart 1072:5 [_handleDrawFrame] lib/_engine/engine/platform_dispatcher.dart 1236:13 invoke lib/_engine/engine/platform_dispatcher.dart 244:5 invokeOnDrawFrame lib/_engine/engine/initialization.dart 190:45 dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 367:37 _checkAndCall dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 372:39 dcall

Screenshots code snippet Error Scrollable

Device: i use the chrome emulator, i only want to use the html editor in webversion

Additional context Add any other context about the problem here.

skensobit commented 7 months ago

everything looks fine. But the scrollable is buggy

looksfine

skensobit commented 7 months ago

it brakes at this point: brakepoint

mklepaczko commented 7 months ago

Same ussue here.

[✓] Flutter (Channel stable, 3.13.5, on macOS 14.1.1 23B81 darwin-arm64, locale pl-PL) • Flutter version 3.13.5 on channel stable at /Users/michalklepaczko/projekty_dev/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 12fccda598 (3 months ago), 2023-09-19 13:56:11 -0700 • Engine revision bd986c5ed2 • Dart version 3.1.2 • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) • Android SDK at /Users/michalklepaczko/Library/Android/sdk • Platform android-33, build-tools 33.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15C65 • CocoaPods version 1.11.3

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.85.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.78.0

[✓] Connected device (3 available) • iPhone12 (Michal) (mobile) • 00008101-00025C6236E9003A • ios • iOS 17.1.2 21B101 • macOS (desktop) • macos • darwin-arm64 • macOS 14.1.1 23B81 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 120.0.6099.109

[✓] Network resources • All expected network resources are available.

• No issues found!

ainjayla commented 4 months ago

What is the status of this bug? I was trying many workarounds but no luck.

[✓] Flutter (Channel stable, 3.19.2, on macOS 13.6.4 22G513 darwin-x64, locale en-EE) • Flutter version 3.19.2 on channel stable at /Users/ylari/Tools/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 7482962148 (10 days ago), 2024-02-27 16:51:22 -0500 • Engine revision 04817c99c9 • Dart version 3.3.0 • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) • Android SDK at /Users/ylari/Library/Android/sdk • Platform android-34, build-tools 33.0.1 • Java binary at: /Users/ylari/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15C500b • CocoaPods version 1.14.3

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2) • Android Studio at /Users/ylari/Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.3.4) • IntelliJ at /Users/ylari/Applications/IntelliJ IDEA Ultimate.app • Flutter plugin version 77.0.1 • Dart plugin version 233.13763.5

[✓] VS Code (version 1.87.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.84.0