@@ -2108,10 +2108,13 @@ class TextSelectionGestureDetectorBuilder {
21082108 switch (defaultTargetPlatform) {
21092109 case TargetPlatform .android:
21102110 case TargetPlatform .fuchsia:
2111+ // On mobile platforms the selection is set on tap up.
2112+ editableText.hideToolbar (false );
21112113 case TargetPlatform .iOS:
21122114 // On mobile platforms the selection is set on tap up.
21132115 break ;
21142116 case TargetPlatform .macOS:
2117+ editableText.hideToolbar ();
21152118 // On macOS, a shift-tapped unfocused field expands from 0, not from the
21162119 // previous selection.
21172120 if (isShiftPressedValid) {
@@ -2132,6 +2135,7 @@ class TextSelectionGestureDetectorBuilder {
21322135 renderEditable.selectPosition (cause: SelectionChangedCause .tap);
21332136 case TargetPlatform .linux:
21342137 case TargetPlatform .windows:
2138+ editableText.hideToolbar ();
21352139 if (isShiftPressedValid) {
21362140 _extendSelection (details.globalPosition, SelectionChangedCause .tap);
21372141 return ;
@@ -2206,18 +2210,16 @@ class TextSelectionGestureDetectorBuilder {
22062210 case TargetPlatform .linux:
22072211 case TargetPlatform .macOS:
22082212 case TargetPlatform .windows:
2209- editableText. hideToolbar () ;
2213+ break ;
22102214 // On desktop platforms the selection is set on tap down.
22112215 case TargetPlatform .android:
2212- editableText.hideToolbar ();
22132216 if (isShiftPressedValid) {
22142217 _extendSelection (details.globalPosition, SelectionChangedCause .tap);
22152218 return ;
22162219 }
22172220 renderEditable.selectPosition (cause: SelectionChangedCause .tap);
22182221 editableText.showSpellCheckSuggestionsToolbar ();
22192222 case TargetPlatform .fuchsia:
2220- editableText.hideToolbar ();
22212223 if (isShiftPressedValid) {
22222224 _extendSelection (details.globalPosition, SelectionChangedCause .tap);
22232225 return ;
0 commit comments