Fix bug where text input would remain underlined upon losing focused. (#5027)

BUG=https://github.com/flutter/flutter/issues/4904
This commit is contained in:
Matt Perry
2016-07-25 17:26:09 -04:00
committed by GitHub
parent 5e7e7b6ea7
commit 07ba37976c

View File

@@ -286,9 +286,11 @@ class RawInputLineState extends ScrollableState<RawInputLine> {
..type = config.keyboardType);
_keyboardHandle.setEditingState(_keyboardClient.editingState);
_keyboardHandle.show();
} else if (!focused && _isAttachedToKeyboard) {
_keyboardHandle.release();
_keyboardHandle = null;
} else if (!focused) {
if (_isAttachedToKeyboard) {
_keyboardHandle.release();
_keyboardHandle = null;
}
_keyboardClient.clearComposing();
}
}
@@ -424,7 +426,7 @@ class RawInputLineState extends ScrollableState<RawInputLine> {
}
return new _EditableLineWidget(
value: config.value,
value: _keyboardClient.inputValue,
style: config.style,
cursorColor: config.cursorColor,
showCursor: _showCursor,