Fix TextField bug when the formatter repeatedly format#67892
Fix TextField bug when the formatter repeatedly format#67892fluttergithubbot merged 3 commits intoflutter:masterfrom
Conversation
LongCatIsLooong
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the fix!
| // Setting _value here ensures the selection and composing region info is passed. | ||
| _value = value; | ||
| if (value == _value) { | ||
| // Please note that the setter will not notify subscribers if set duplicate values. |
There was a problem hiding this comment.
nit: according to the style guide we should try to avoid empty prose, it applies to code comments as well.
| ); | ||
| }); | ||
|
|
||
| testWidgets('Synchronous test of local and remote editing values (#2)', (WidgetTester tester) async { |
There was a problem hiding this comment.
nit: maybe call this 'Send text input state to engine when the input formatter rejects user input'.
| expect( | ||
| methodCall, | ||
| isMethodCall('TextInput.setEditingState', arguments: <String, dynamic>{ | ||
| 'text': 'Flutter is the best!', |
There was a problem hiding this comment.
nit: if we only care about the text value here we can just say containsPair('text, 'Flutter is the best!'),. See https://api.flutter.dev/flutter/package-matcher_matcher/containsPair.html
AlexV525
left a comment
There was a problem hiding this comment.
LGTM (as per @LongCatIsLooong ). The CI is complaining but it seems related with network. If it continues to failed, please merge new commits from master and try again.
justinmc
left a comment
There was a problem hiding this comment.
LGTM, thanks for the quick fix. It looks like the tests are passing so this can be merged when the build is green.
|
Will we see this fix as an hotfix in flutter 1.22.3? |
|
Just added an request in #67828 . |
* Fix TextField bug when the formatter repeatedly format (#67892) * Adjust constraints (#68437) * update engine Co-authored-by: xubaolin <[email protected]> Co-authored-by: Michael Thomsen <[email protected]>
Description
Fix a regressing bug introduced by 0d945a1
The engine was not notified when the formatter repeatedly format.
So sorry to introduced this bug, I added a test case to ensure that no mistake will be made again.
@justinmc @LongCatIsLooong please review, thanks.
Related Issues
Fixes #67828
Fixes #67236
Fixes #67262
Fixes #67895
Tests
I added the following tests:
"Send text input state to engine when the input formatter rejects user input" in editable text test.