Skip to content

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

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
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.

2 participants