8 Commits

Author SHA1 Message Date
Robert Ancell
ab23dc3a74 Update code style to pass clang-tidy checks 2020-08-05 10:35:03 +12:00
stuartmorgan
29f63349c8
Fix invalid selection handling in text plugins (#19899)
The Windows, Linux, and GLFW embeddings (which all share a common code
ancestry) pass TextInput.setEditingState selection base and extents
straight through to the shared text model class. The model expects those
values to be valid, but the framework sends -1/-1 for "invalid"
selections, which happen for some empty text cases (e.g.,
TextFieldController.clear()).

This translates those invalid selection values to an empty selection at
the start of the string, as expected by the model.

Fixes https://github.com/flutter/flutter/issues/59140
2020-07-27 11:00:02 -07:00
Robert Ancell
9f898e98c2
Don't process key events when the text input is not requested (#18990) 2020-06-12 10:59:35 +12:00
Robert Ancell
6f5d92d241
Remove the input type and action from TextInputModel. (#18919)
These aren't used by the model so are better managed outside of it.
2020-06-10 10:00:32 +12:00
Robert Ancell
db6793bca3
Use constant for error code (#18913) 2020-06-10 06:27:08 +12:00
Robert Ancell
320e80552f
Update FlTextInputPlugin method handler style. (#18886)
Match the style used in the external plugins and more carefully vet the incoming
arguments.
2020-06-09 11:36:00 +12:00
Robert Ancell
8d97830992
Fix braces style (#18837) 2020-06-05 13:26:54 +12:00
Robert Ancell
2bd95d9a4c
Add FlTextInputPlugin (#18314)
* Add FlTextInputPlugin
2020-05-28 13:11:16 +12:00