Skip to content
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

[web] Changes to EditableState to be able to handle Framework text selection shortcuts #37097

Merged
merged 9 commits into from
Nov 1, 2022

Conversation

htoor3
Copy link
Contributor

@htoor3 htoor3 commented Oct 28, 2022

Currently there's an issue in which keyboard shortcuts (shift + arrow keys) don't autoscroll on web inputs and textfields. Delegating these keyboard actions to the framework fixes this issue and allows for a more consistent UX for web.

As part of that change, the EditableState class needs to be able to handle flipped base and extent offsets, as well as have sensible defaults for composing offsets.

Part 1 fixes flutter/flutter#107707

Framework changes PR: flutter/flutter#114264

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See [testing the engine] for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the [CLA].
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Oct 28, 2022
Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

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

Great tests!

Let's also add one to make sure EditingState.fromFrameworkMessage() sets the composing values to -1.

Could you also open the framework-side PR so reviewers can look at both PRs together?

lib/web_ui/test/text_editing_test.dart Show resolved Hide resolved
lib/web_ui/test/text_editing_test.dart Show resolved Hide resolved
@htoor3
Copy link
Contributor Author

htoor3 commented Oct 28, 2022

Great tests!

Let's also add one to make sure EditingState.fromFrameworkMessage() sets the composing values to -1.

Could you also open the framework-side PR so reviewers can look at both PRs together?

@mdebbar Added that suggested tests and the PR in the description

@htoor3 htoor3 force-pushed the text-edit-shift-issue-engine branch from 60c499e to 6d3c372 Compare October 28, 2022 23:08
@htoor3 htoor3 requested a review from mdebbar October 31, 2022 15:45
Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

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

LGTM

@htoor3 htoor3 added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 1, 2022
@auto-submit auto-submit bot merged commit a98c82a into flutter:main Nov 1, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 1, 2022
schwa423 pushed a commit to schwa423/engine that referenced this pull request Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine
Projects
None yet
2 participants