Repository navigation
EditableText calls onSelectionChanged even if the selection does not change. #76349
Copy link
Copy link
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-text-inputOwned by Text Input teamOwned by Text Input teamtriaged-text-inputTriaged by Text Input teamTriaged by Text Input team
Description
Activity
- addeda: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.c: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.
on Feb 19, 2021 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.- locked as resolved and limited conversation to collaborators
on Aug 27, 2021 - addedteam-designOwned by Design Languages teamOwned by Design Languages team
on May 15, 2025 - addedP2Important issues not at the top of the work listImportant issues not at the top of the work listteam-text-inputOwned by Text Input teamOwned by Text Input teamtriaged-text-inputTriaged by Text Input teamTriaged by Text Input teamand removedteam-designOwned by Design Languages teamOwned by Design Languages team
on May 15, 2025 - unlocked this conversation
on May 16, 2025 - addedpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.and removedframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
on Aug 17, 2026
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-text-inputOwned by Text Input teamOwned by Text Input teamtriaged-text-inputTriaged by Text Input teamTriaged by Text Input team
If you add a print statement in this method
flutter/packages/flutter/lib/src/material/text_field.dart
Line 1070 in 934dfde
long press the textfield, you will see the print statement even if text selection does not change. This behavior is contradicted to the EditableText.onSelectionChange contract. Unfortunately, this is needed because textfield relies on this call to update the handle visibility.
We should fix this by refactoring out selection overlay of editable text so that text field does not need to rely on this callback, and then we should finally able to fix the EditableText.onSelectionChanged.