[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
FlutterIssues opened this issue Nov 9, 2015 · 2 comments · Fixed by #1379
Assignees
Labels
a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels.

Comments

@FlutterIssues
Copy link

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);
  }
}

@FlutterIssues FlutterIssues added the a: text input Entering text in a text field or keyboard related problems label Nov 9, 2015
@FlutterIssues
Copy link
Author

Comment by abarth
Monday Oct 19, 2015 at 16:26 GMT


/cc @jason-simmons

@Hixie Hixie added the ⚠ bug label Dec 12, 2015
@Hixie Hixie added this to the Blue Sky milestone Dec 12, 2015
@Hixie Hixie added the framework flutter/packages/flutter repository. See also f: labels. label Dec 12, 2015
@abarth abarth self-assigned this Jan 25, 2016
abarth added a commit to abarth/flutter that referenced this issue Jan 26, 2016
Previously, EditableString had many public members because it needed to
implement the KeyboardClient interface. However, that's confusing
because these methods cannot be called directly.

Now EditableString holds a private implementation of the KeyboardClient,
which hides the implementation details.

Fixes flutter#208
Fixes flutter#209
@efidje efidje mentioned this issue May 8, 2018
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants