flutter_typeahead
flutter_typeahead copied to clipboard
Not working on Safari flutter 2.10.0
Hi, recently I upgraded to flutter 2.10.0 and before that typeahead was working fine on Safari. But now I can not type text in the TypeAheadFormField.
Same situation for me after upgrading to Flutter 2.10.0.
Flutter 2.10.0-0.3.pre • channel beta • https://github.com/flutter/flutter.git Framework • revision fdd0af78bb (3 weeks ago) • 2022-01-25 22:01:33 -0600 Engine • revision 5ac30ef0c7 Tools • Dart 2.16.0 (build 2.16.0-134.5.beta) • DevTools 2.9.2
flutter_typeahead version 3.2.4
Works perfectly on Chrome and Firefox, but on Safari 15.3 (Mac OS 12.2) the TypeAheadFormField will not accept any keyboard input. The field accepts focus and a cursor appears, but nothing appears in the field. A suggestionsCallback is called with an empty string, and if I select something from the typeahead suggestion dropdown it does populate the field. Yet still no keyboard input is received.
Standard Flutter TextFormField's I have on the same page all work and behave normally.
The Safari behaviour occurs both in development and in an instance deployed to Firebase hosting.
I'm not sure how to debug further as no console errors appear in Safari's js console.
ADDIT:
Tested both TypeAheadField
and TypeAheadFormField
and both show same behaviour.
Here's an example of how I am using it to allow a user to tag a record:
TypeAheadFormField(
textFieldConfiguration: TextFieldConfiguration(
textInputAction: TextInputAction.go,
onSubmitted: (value) {
controller.addTag(value);
controller.tagsController.clear();
},
decoration: InputDecoration(
filled: true,
prefixIcon: Icon(Icons.local_offer),
labelText: "Add Tags",
),
controller: controller.tagsController,
),
suggestionsCallback: (pattern) {
return controller.eventController.getSuggestions('tags', pattern);
},
itemBuilder: (context, suggestion){
return ListTile(
title: Text(suggestion),
);
},
autoFlipDirection: true,
hideOnEmpty: true,
onSuggestionSelected: (suggestion) {
controller.addTag(suggestion);
controller.tagsController.clear();
},
),
Good news @rutaba1 - this issue was identified as Flutter #96411 for 2.10 and has been fixed in beta, 2.11.0-0.1.pre.
Go do a flutter upgrade
to get this goodness! I just upgraded and confirmed the problem is fixed in both my dev system and in production when deployed to firebase.
Good news @rutaba1 - this issue was identified as Flutter #96411 for 2.10 and has been fixed in beta, 2.11.0-0.1.pre.
Go do a
flutter upgrade
to get this goodness! I just upgraded and confirmed the problem is fixed in both my dev system and in production when deployed to firebase.
still not working on Flutter 3.7.0....
No, it has been working from Flutter 2.10 to 3.3.
Now in 3.7 there is a new, different issue related to onSuggestionSelected
not being called (as per #446).