quill_html_editor icon indicating copy to clipboard operation
quill_html_editor copied to clipboard

[BUG] How to change range selection text

Open antonydieu opened this issue 1 year ago • 4 comments

Describe the bug editor can't move range selection text. Lib quill_html_editor: ^2.2.6

Smartphone (please complete the following information):

  • Device: simulator iphone 15 pro max
  • OS: 17.0.1
Code sample
SingleChildScrollView(
              child: QuillHtmlEditor(
                text: "",
                hintText: 'Hint text goes here',
                controller: widget.controller,
                isEnabled: true,
                ensureVisible: true,
                minHeight: 200,
                autoFocus: true,
                textStyle: _editorTextStyle,
                hintTextStyle: _hintTextStyle,
                hintTextAlign: TextAlign.start,
                padding: const EdgeInsets.only(left: 10, top: 10),
                hintTextPadding: const EdgeInsets.only(left: 20),
                backgroundColor: _backgroundColor,
                inputAction: InputAction.newline,
                onEditingComplete: (s) => debugPrint('Editing completed $s'),
                loadingBuilder: (context) {
                  return const Center(
                      child: CircularProgressIndicator(
                        strokeWidth: 1,
                        color: Colors.red,
                      ));
                },
                onFocusChanged: (focus) {
                  debugPrint('has focus $focus');
                  setState(() {
                    _hasFocus = focus;
                  });
                },
                onTextChanged: (text) => debugPrint('widget text change $text'),
                onEditorCreated: () {
                  debugPrint('Editor has been loaded');
                  setHtmlText('');
                },
                onEditorResized: (height) =>
                    debugPrint('Editor resized $height'),
                onSelectionChanged: (sel) =>
                    debugPrint('index ${sel.index}, range ${sel.length}'),
              ),
            )
**Flutter Doctor** Please run `flutter doctor` in the terminal and add the log here. fvm flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.10.3, on macOS 14.2 23C64 darwin-arm64, locale en-VN) [!] Android toolchain - develop for Android devices (Android SDK version 33.0.2) ✗ cmdline-tools component is missing Run `path/to/sdkmanager --install "cmdline-tools;latest"` See https://developer.android.com/studio/command-line for more details. ✗ Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details. [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] VS Code (version 1.85.1) [✓] Connected device (4 available) [✓] Network resources

! Doctor found issues in 1 category. Video demo

https://github.com/the-airbender/quill_html_editor/assets/5988428/c9e8565a-ae8c-4159-b59b-31f4bdd4fb8a

antonydieu avatar Jan 09 '24 08:01 antonydieu

When focus to editor I need disable : physics: NeverScrollableScrollPhysics() when unfocus need set physics: AlwaysScrollableScrollPhysics(). But unfocus and focus work not exactly. I need check show or dismiss key board to set physics for SingleChildScrollView

antonydieu avatar Jan 11 '24 08:01 antonydieu

Hello @antonydieu,

Could you please try it on a physical device and confirm if the issue exists?

Thanks :)

the-airbender avatar Jan 13 '24 04:01 the-airbender

@the-airbender This issue persist on real device. Especially on iOS.

dongnqda avatar Jun 11 '24 12:06 dongnqda

@the-airbender I can also confirm this issue persists on physical iOS device.

quill_html_editor: ^2.2.8
Flutter 3.22.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 761747bfc5 (3 weeks ago) • 2024-06-05 22:15:13 +0200
Engine • revision edd8546116
Tools • Dart 3.4.3 • DevTools 2.34.3

This impacts the core functionality of the editor. Is there any hack/trick we can use in the meantime?

SlickSlime avatar Jun 26 '24 05:06 SlickSlime