Skip to content

EditableString throw unexpected error!! when do no commit text, do input text and delete key. #209

@FlutterIssues

Description

@FlutterIssues

Issue by kyorohiro
Sunday Oct 18, 2015 at 05:15 GMT
Originally opened as https://github.com/flutter/engine/issues/1663


EditableString throw unexpected error!! when do no commit text, do input text and delete key.

[senario]
0 . run application
https://github.com/kyorohiro/hello_skyengine/tree/master/edit_text

  1. show software keyboard
  2. input composing text
  3. push delete key
  4. push delete key
  5. input composing text
    --> then unexpected error

[source for reproduction]

//
// https://github.com/kyorohiro/hello_skyengine/tree/master/edit_text_3
import 'package:flutter/widgets.dart';
import 'package:flutter/services.dart';
import 'dart:async';

main() async {
  EditableString st = new EditableString(text: "test:", onUpdated: () {});
  KeyboardHandle handle = keyboard.show(st.stub, KeyboardType.TEXT);
  await new Future.delayed(new Duration(seconds: 3));
  for (int i = 0; i < 3; i++) {
    print("----");
    st.setComposingText("a", 1);
    await new Future.delayed(new Duration(seconds: 1));
    st.setComposingText("", 0);
    await new Future.delayed(new Duration(seconds: 1));
    st.deleteSurroundingText(1, 0);
  }
}

Metadata

Metadata

Assignees

Labels

a: text inputEntering text in a text field or keyboard related problemsframeworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions