-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemscustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.e: device-specificOnly manifests on certain devicesOnly manifests on certain devicesengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.platform-androidAndroid applications specificallyAndroid applications specifically
Description
Hello!
Within a flutter application that has TextField or TextFormField the text can get duplicated upon first time data entry.
When first entering a keypress, within a field that already has text pre-filled, the text duplicates then your keypress is attached.
I am experiencing something that exhibits this behavior on my Samsung Galaxy S7, S8 and S9 (only devices I have to test with). This doesn't occur within the emulator (Galaxy Nexus9 and Pixel 2).
If I place a space at the end of the field, this problem doesn't happen, however, if I tap in middle of a pre filled field (using controller or initialValue) and press a key it does occur.
class SampleTextFormPage extends StatefulWidget {
@override
State<StatefulWidget> createState() => new _SampleTextFormPage();
}
class _SampleTextFormPage extends State<SampleTextFormPage> {
final _scaffoldKey = new GlobalKey<ScaffoldState>();
TextEditingController _txtController;
@override
void initState() {
super.initState();
_txtController = TextEditingController(text:'Using Controller');
}
@override
Widget build(BuildContext context) { Scaffold scaffold = new Scaffold(
key: _scaffoldKey,
appBar: new AppBar(
title: new Text('Text Entry',
style: const TextStyle(
color: Colors.white)
),
backgroundColor: Colors.indigo
),
body: Column(children: [
//field 1
TextField(
autocorrect: false,
autofocus: true,
controller: _txtController,
),
//field 2
TextFormField(
autocorrect: false,
autofocus: true,
initialValue: 'Using initialValue',
)
])
);
return scaffold;
}
}
chulwoo-park, Endebert, red282, seritaApp, PerLycke and 16 more
Metadata
Metadata
Assignees
Labels
a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemscustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.e: device-specificOnly manifests on certain devicesOnly manifests on certain devicesengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.platform-androidAndroid applications specificallyAndroid applications specifically