Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(471)

Unified Diff: sky/framework/components/input.dart

Issue 1027633003: [Effen] Add AnimatedComponent base class (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: cr changes Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/framework/components/ink_well.dart ('k') | sky/framework/components/popup_menu.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/components/input.dart
diff --git a/sky/framework/components/input.dart b/sky/framework/components/input.dart
index e284f34180e2cbe62d3df6e9326c7aa8bb636d19..b07e404b886a571892a9d119797171cecb1e4353 100644
--- a/sky/framework/components/input.dart
+++ b/sky/framework/components/input.dart
@@ -49,6 +49,10 @@ class Input extends Component {
: super(key: key, stateful: true) {
_editableValue = new EditableString(text: _value,
onUpdated: _handleTextUpdated);
+ onDidUnmount(() {
+ if (_isAttachedToKeyboard)
+ keyboard.hide();
+ });
}
void _handleTextUpdated() {
@@ -60,11 +64,6 @@ class Input extends Component {
}
}
- void didUnmount() {
- if (_isAttachedToKeyboard)
- keyboard.hide();
- }
-
Node build() {
if (focused && !_isAttachedToKeyboard) {
keyboard.show(_editableValue.stub);
« no previous file with comments | « sky/framework/components/ink_well.dart ('k') | sky/framework/components/popup_menu.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698