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

Fix jumping when doing long press for selecting text #102270

Merged
merged 2 commits into from
Apr 22, 2022
Merged

Fix jumping when doing long press for selecting text #102270

merged 2 commits into from
Apr 22, 2022

Conversation

rgevrek
Copy link
Contributor

@rgevrek rgevrek commented Apr 21, 2022

If on an EditableText or SelectableText widget a text is selected, then the viewport will be scrolled to the last cursor position, but while selecting any text, the cursor gets an inactive state _cursorActive = false.
With this PR the misbehaviour of jumping to a non existent cursor will be avoided with checking for !_cursorActive to interrupt jumping to the non existing cursor.

#91464 will be resolved

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], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. labels Apr 21, 2022
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@rgevrek
Copy link
Contributor Author

rgevrek commented Apr 21, 2022

Hi @LongCatIsLooong
Have you any idea to solve the check:

ci.yaml validation
.ci.yaml has failures

DETAILS
FormatException: ERROR: Mac gradle_plugin_fat_apk_test is a new builder added. it needs to be marked bringup: true

@LongCatIsLooong
Copy link
Contributor

could you try syncing the pull request to upstream/master?

@rgevrek rgevrek closed this Apr 21, 2022
@rgevrek
Copy link
Contributor Author

rgevrek commented Apr 21, 2022

thank you for your hint @LongCatIsLooong

@rgevrek rgevrek reopened this Apr 21, 2022
Copy link
Contributor

@LongCatIsLooong LongCatIsLooong left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix!

Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM

@fluttergithubbot fluttergithubbot merged commit 6ea4aef into flutter:master Apr 22, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 22, 2022
@rgevrek rgevrek deleted the fix_jump_away_while_selecting branch April 22, 2022 22:41
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 22, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 23, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 23, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 23, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 23, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 28, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 28, 2022
egramond pushed a commit to egramond/flutter that referenced this pull request May 5, 2022
CaseyHillers added a commit that referenced this pull request May 5, 2022
CaseyHillers pushed a commit to CaseyHillers/flutter that referenced this pull request May 5, 2022
CaseyHillers pushed a commit that referenced this pull request May 5, 2022
CaseyHillers pushed a commit to CaseyHillers/flutter that referenced this pull request May 6, 2022
CaseyHillers pushed a commit that referenced this pull request May 6, 2022
)

* Revert "Fix jumping when doing long press for selecting text (#102270)" (#103142)

This reverts commit 6ea4aef.

* Roll engine with Cps

* Fix engine hash
muditatandon pushed a commit to muditatandon/flutter that referenced this pull request May 9, 2022
…ter#103206)

* Revert "Fix jumping when doing long press for selecting text (flutter#102270)" (flutter#103142)

This reverts commit 6ea4aef.

* Roll engine with Cps

* Fix engine hash
muditatandon added a commit that referenced this pull request May 9, 2022
…#103374)

* [flutter_releases] Cherry pick flutter-2.13-candidate.7 changes  (#103206)

* Revert "Fix jumping when doing long press for selecting text (#102270)" (#103142)

This reverts commit 6ea4aef.

* Roll engine with Cps

* Fix engine hash

* [flutter_releases] partial revert of repaint boundary change (#102962) (#103214)

Co-authored-by: Jonah Williams <jonahwilliams@google.com>

* [flutter_releases] remove assert on markNeedsCompositingBitsUpdate #103227 (#103225)

Co-authored-by: Casey Hillers <chillers@google.com>
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
@S-Man42
Copy link

S-Man42 commented Sep 20, 2022

Is there any chance ti get this live? I still have the problem. However, do I understand the last message correctly, that you fix has been removed?

@rgevrek
Copy link
Contributor Author

rgevrek commented Sep 20, 2022

Is there any chance ti get this live? I still have the problem. However, do I understand the last message correctly, that you fix has been removed?

@S-Man42, yes the fix is removed from master due to Google internal pipeline errors. @LongCatIsLooong is taking care and would fix.

@dtq
Copy link

dtq commented Nov 23, 2022

Would it be possible to have this hotfixed into 3.3.x stable? This issue is effecting a large number of our production users.

@lrorpilla
Copy link

It's now April 2023 and I am still experiencing this issue... I still sometimes view the StackOverflow thread on this issue and go to this thread almost habitually just to find out if there are any updates on this fix being merged back to stable.

Some of us rely on CI/CD pipelines that build with stable and we can't rely on custom forks of Flutter for one or two lines of code deletions in editable_text.dart...

Is it possible I could follow up on a status for this fix being added back to stable? This is really weird and annoying behaviour...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants