Repository navigation
Description
Steps to Reproduce
Minimal example
class TestTextSelectionScroll extends StatefulWidget {
@override
_TestTextSelectionScrollState createState() =>
_TestTextSelectionScrollState();
}
class _TestTextSelectionScrollState extends State<TestTextSelectionScroll> {
final TextEditingController _body = TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
child: ListView(
children: [
TextField(
controller: _body,
style: Theme.of(context).textTheme.bodyText1,
maxLines: null,
),
],
),
),
);
}
}
Any Textfield, Textformfield in listview has unwanted scrolling in the opposite direction of scroll when selecting long lines of text within the field.
Expected results: Scroll only when cursor moves out of the viewport(not sure if thats the term)
Actual results: Unusual Scrolling in the opposite direction
Details
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19043.1165], locale en-IN) • Flutter version 2.2.3 at C:\Android\flutter • Framework revision f4abaa0 (8 weeks ago), 2021-07-01 12:46:11 -0700 • Engine revision 241c87ad80 • Dart version 2.13.4[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Android\sdk
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = C:\Android
• ANDROID_SDK_ROOT = C:\Android\sdk
• Java binary at: C:\Android\openjdk\bin\java
• Java version OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_202-b08)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.8.4)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
• Visual Studio Build Tools 2019 version 16.8.30907.101
• Windows 10 SDK version 10.0.19041.0
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
[√] VS Code (version 1.59.1)
• VS Code at ########
• Flutter extension version 3.25.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19043.1165]
• Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159
• Edge (web) • edge • web-javascript • Microsoft Edge 92.0.902.78

Activity
darshankawar commentedon Aug 27, 2021
@DhivakarK-git
Can you check if it occurs on physical device too ?
DhivakarK-git commentedon Aug 27, 2021
Yes, I wasn't able to share a video of the same, but I first noticed it on a physical device and then tried it with the minimal example above.
HansMuller commentedon Aug 27, 2021
CC @chunhtai
darshankawar commentedon Aug 30, 2021
@DhivakarK-git
Tried the same on Pixel 5 emulator on latest master but couldn't replicate the issue. Can you try the same on latest master and confrim ?
DhivakarK-git commentedon Aug 30, 2021
@darshankawar
Problem still persists in the latest master and latest android sdk. It happens when the no. of text lines in length is atleast twice that of the length of viewport. Happens when u try to drag the handles up or down.
Details
[√] Flutter (Channel master, 2.6.0-1.0.pre.112, on Microsoft Windows [Version 10.0.19043.1165], locale en-IN) • Flutter version 2.6.0-1.0.pre.112 at C:\Android\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 0c65de1 (7 hours ago), 2021-08-30 05:26:01 -0400 • Engine revision c05688f • Dart version 2.15.0 (build 2.15.0-65.0.dev)[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at C:\Android\sdk
• Platform android-31, build-tools 31.0.0
• ANDROID_HOME = C:\Android
• ANDROID_SDK_ROOT = C:\Android\sdk
• Java binary at: C:\Android\openjdk\bin\java
• Java version OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_202-b08)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.8.4)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
• Visual Studio Build Tools 2019 version 16.8.30907.101
• Windows 10 SDK version 10.0.19041.0
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
[√] VS Code (version 1.59.1)
• VS Code at ########
• Flutter extension version 3.25.0
[√] Connected device (4 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 12 (API 31) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19043.1165]
• Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159
• Edge (web) • edge • web-javascript • Microsoft Edge 92.0.902.84
darshankawar commentedon Aug 31, 2021
Thanks for the updates. Verified again on latest master and stable and observed the same behavior.
stable, master flutter doctor -v
2 remaining items
[-]TextField,TextformField TextSelection causes scrolling when inside ListView,SingleChildScrollView[/-][+]Text selection leads to scrolling in opposite direction[/+]DhivakarK-git commentedon Sep 2, 2021
@darshankawar
any possible workaround for now?
Renzo-Olivares commentedon Jun 2, 2026
Closing this issue as a duplicate of #132047. Please feel free to re-open if this is not the case.
github-actions commentedon Jul 14, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.