Skip to content

Conversation

@theachoem
Copy link
Contributor

@theachoem theachoem commented May 17, 2025

Description

For this fix, I copied all code based on flutter editable_text.dart to have the same behavior. I have pushed multiple commits to track the changes:

  • The first commit is just copied original code from Flutter (no change): editable_text.dart#L4228
  • The second commit is refactoring to fit flutter_quill

Related Issues

Fixed Demo

Screen.Recording.2025-05-18.at.1.41.39.in.the.morning.mp4

Type of Change

  • Feature: New functionality without breaking existing features.
  • 🛠️ Bug fix: Resolves an issue without altering current behavior.
  • 🧹 Refactor: Code reorganization, no behavior change.
  • Breaking: Alters existing functionality and requires updates.
  • 🧪 Tests: New or modified tests
  • 📝 Documentation: Updates or additions to documentation.
  • 🗑️ Chore: Routine tasks, or maintenance.
  • Build configuration change: Build/configuration changes.

@theachoem theachoem force-pushed the develop branch 3 times, most recently from 2b92596 to 698d0b0 Compare May 17, 2025 18:49
@theachoem
Copy link
Contributor Author

theachoem commented May 17, 2025

Mostly works, but ran into a bit of an issue, it does not auto-scroll on the first request focus until I start typing:

Screen.Recording.2025-05-18.at.1.54.38.in.the.morning.mov

@theachoem
Copy link
Contributor Author

Mostly works, but ran into a bit of an issue, it does not auto-scroll on the first request focus until I start typing:
https://github.com/user-attachments/assets/63dd56bc-69f4-4443-8928-dc4eb1687293

Handle didChangeMetrics fix the issue:

Screen.Recording.2025-05-18.at.2.08.21.in.the.morning.mov

Reference:

@theachoem
Copy link
Contributor Author

@EchoEllet I have released this to my production app for a few days now. If you have any concerns about it being merged, let me know. I will refactor accordingly.

Copy link
Collaborator

@EchoEllet EchoEllet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of changes that I'm not related to at the moment, I'm not able to work on the project for a while (again).

Unfortunately, I can't take responsibility for reviewing PRs at this point.

Hopefully, fellow maintainers will review it at some point.

@theachoem
Copy link
Contributor Author

@EchoEllet I understand. I am confident about it, and I think if other contributors do it, it will likely output the same result. Let me know what I can do.

@theachoem
Copy link
Contributor Author

Seem like quality check no longer work because flutter just release new stable version. Let me fix that.

warning • Doc imports can't have show or hide combinators • lib/src/editor/config/editor_config.dart:1:42 • doc_import_cannot_have_combinators
warning • Doc imports can't have show or hide combinators • lib/src/toolbar/config/buttons/link_style_options.dart:1:45 • doc_import_cannot_have_combinators

Solution is to remove 'show', just @docImport '../path' is enough to import and make type clickable in comment. This issue raise latest flutter 3.32.0
@singerdmx
Copy link
Owner

@EchoEllet shall we merge this?

@EchoEllet
Copy link
Collaborator

EchoEllet commented Jun 15, 2025

I'm not able to review it in a reasonable time frame, sorry but I can't confirm my review. Please make the call.

@singerdmx singerdmx merged commit 3ac4027 into singerdmx:master Jun 15, 2025
7 checks passed
@anneinge95
Copy link

How can I implement this? I still have this problem. Thanks a lot!

@theachoem
Copy link
Contributor Author

You can point to the master branch directly.

@anneinge95
Copy link

It is working, thanks a lot for the work! However, the cursor scrolls behind/under the custom toolbar. Auto-scroll only accounts for the keyboard height, not additional UI elements above it.

@theachoem
Copy link
Contributor Author

@anneinge95 works fine for me, make sure you put the toolbar in the bottom navigation.

- Fix caret not auto scroll to visible when page has multiple editors [#2570](https://github.com/singerdmx/flutter-quill/pull/2570).

### Changed
- **BREAKING**: QuillEditorConfig is now accept `EdgeInsets padding` instead of `EdgeInsetsGeometry`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this breaking change introduced? Does not seem to be related to the fix, and the PR description does not state that this is a breaking change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

      widget.config.padding.copyWith(bottom: bottomSpacing);

  var bottomSpacing = widget.config.padding.bottom;

Padding are used here. We need access to copy with & .bottom

EchoEllet added a commit that referenced this pull request Jul 22, 2025
@EchoEllet
Copy link
Collaborator

EchoEllet commented Jul 22, 2025

I reverted this PR because it includes unrelated changes beyond the intended fix. To maintain stability, we avoid introducing breaking changes unless absolutely necessary. Please consider submitting a focused PR with only the relevant fix.

@theachoem
Copy link
Contributor Author

I reverted this PR because it includes unrelated changes beyond the intended fix. To maintain stability, we avoid introducing breaking changes unless absolutely necessary. Please consider submitting a focused PR with only the relevant fix.

Thanks for the update. However, all the changes in that PR are necessary and part of the intended fix. The breaking changes were required to access the padding.bottom, or padding.copyWith instead of just horizonal or vertical value.

Please consider reverting it back, let me know what I can help.

@EchoEllet
Copy link
Collaborator

let me know what I can help.

This isn't an issue with your PR; it's a project maintenance issue.

However, all the changes in that PR are necessary and part of the intended fix

The lint fixes are not part of the PR fix, and it's a CI issue.

For this fix, I copied all code based on flutter editable_text.dart to have the same behavior.

Generally, I prefer to avoid the approach of copying complex code and modifying it. It was done previously with the magnifier feature, but had to revert it due to significant regressions.

I'm no longer a project maintainer, but
It looks like PRs are being merged without any review, consideration, testing, or documentation, so every consumer is a testing site. I have seen this pattern before when I was a maintainer, and I still see it today.

Unfortunately, it looks like there are no longer active project maintainers, so for new projects I highly recommend alternatives such as super_editor or appflowy_editor.

@theachoem
Copy link
Contributor Author

The lint fixes are not part of the PR fix, and it's a CI issue.

I agree, but if I don’t fix the lint, the CI fails and the PR can’t be merged.

Generally, I prefer to avoid the approach of copying complex code and modifying it. It was done previously with the magnifier feature, but #2413 due to significant regressions.

I get that. But Flutter Quill already copies a lot from Flutter’s text field, and this helps keep behavior consistent. In this case, copying from editable_text.dart was needed for things to work properly. It also keeps up to date by comparing with latest text_field.

Unfortunately, it looks like there are no longer active project maintainers, so for new projects I highly recommend alternatives such as super_editor or appflowy_editor.

That might be true, but the project still works well for my app, so I don’t see a need to switch right now.

@EchoEllet
Copy link
Collaborator

EchoEllet commented Jul 22, 2025

Merging it might work for your app, but without proper testing, I can't risk merging it for everyone. I'm not the original maintainer and trying to leave—please consider forking if you need it.

However, I appreciate your efforts on this PR, but it's a project issue rather than an issue with your PR.

But Flutter Quill already copies a lot from Flutter’s text field

We should improve the situation instead of blindly copy-pasting code we don't understand (Flutter internal) and shipping it to the users of this package.

I agree, but if I don’t fix the lint, the CI fails and the PR can’t be merged.

This can be fixed without introducing the change as part of this PR. This makes the revert (if we decided to make it) harder with many conflicts.

That might be true, but the project still works well for my app,

You could use a dependency override with your fork, and pull changes from upstream repo to upgrade.

To explain the situation (off-topic)

I wanted to quit Flutter Quill 1 or 2 years ago, but all the previous maintainers have abandoned the project, so I'm the only one who is working with the project (see commit history).

I don't think we're as strict as we used to be. PRs are being merged without enough consideration, and when regressions happen, I'm often the only one left to fix them and clean up the mess. Maintaining a codebase like Flutter Quill is time-consuming for anyone who has worked with its internals.

@Aruljebaraj
Copy link

any idea how to fix this ?

@anneinge95
Copy link

Is there a new solution?

Repository owner locked and limited conversation to collaborators Aug 4, 2025
Repository owner unlocked this conversation Aug 4, 2025
@anneinge95 anneinge95 mentioned this pull request Sep 21, 2025
1 task
@theachoem theachoem deleted the develop branch November 6, 2025 08:40
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.

5 participants