-
Notifications
You must be signed in to change notification settings - Fork 996
Fix caret not auto scroll to visible when page has multiple editors #2570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2b92596 to
698d0b0
Compare
|
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 |
Handle didChangeMetrics fix the issue: Screen.Recording.2025-05-18.at.2.08.21.in.the.morning.movReference: |
|
@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. |
EchoEllet
left a comment
There was a problem hiding this 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.
|
@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. |
|
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
|
@EchoEllet shall we merge this? |
|
I'm not able to review it in a reasonable time frame, sorry but I can't confirm my review. Please make the call. |
|
How can I implement this? I still have this problem. Thanks a lot! |
|
You can point to the master branch directly. |
|
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. |
|
@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`. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
|
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. |
This isn't an issue with your PR; it's a project maintenance issue.
The lint fixes are not part of the PR fix, and it's a CI issue.
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 Unfortunately, it looks like there are no longer active project maintainers, so for new projects I highly recommend alternatives such as |
I agree, but if I don’t fix the lint, the CI fails and the PR can’t be merged.
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.
That might be true, but the project still works well for my app, so I don’t see a need to switch right now. |
|
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.
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.
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.
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. |
|
any idea how to fix this ? |
|
Is there a new solution? |
Description
For this fix, I copied all code based on flutter
editable_text.dartto have the same behavior. I have pushed multiple commits to track the changes:Related Issues
Fixed Demo
Screen.Recording.2025-05-18.at.1.41.39.in.the.morning.mp4
Type of Change