• Renzo Olivares's avatar
    Fix text selection in `SearchAnchor/SearchBar` (#137636) · 3225aa58
    Renzo Olivares authored
    This changes fixes text selection gestures on the search field when using `SearchAnchor`.
    
    Before this change text selection gestures did not work due to an `IgnorePointer` in the widget tree.
    
    This change:
    * Removes the `IgnorePointer` so the underlying `TextField` can receive pointer events.
    * Introduces `TextField.onTapAlwaysCalled` and `TextSelectionGestureDetector.onUserTapAlwaysCalled`, so a user provided on tap callback can be called on consecutive taps. This is so that the user provided on tap callback for `SearchAnchor/SearchBar` that was previously only handled by `InkWell` will still work if a tap occurs in the `TextField`s hit box. The `TextField`s default behavior is maintained outside of the context of `SearchAnchor/SearchBar`.
    
    Fixes https://github.com/flutter/flutter/issues/128332 and #134965
    3225aa58
Name
Last commit
Last update
.github Loading commit data...
.vscode Loading commit data...
bin Loading commit data...
dev Loading commit data...
examples Loading commit data...
packages Loading commit data...
.ci.yaml Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CODEOWNERS Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
PATENT_GRANT Loading commit data...
README.md Loading commit data...
TESTOWNERS Loading commit data...
analysis_options.yaml Loading commit data...
dartdoc_options.yaml Loading commit data...
flutter_console.bat Loading commit data...