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

Unified Diff: sky/framework/editing/editable_text.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/scrollable.dart ('k') | sky/framework/fn.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/editing/editable_text.dart
diff --git a/sky/framework/editing/editable_text.dart b/sky/framework/editing/editable_text.dart
index 5a0b0810d10c24e941dbb125997529d067995d87..cbc429f4a02270984d82116e20a3b63351121929 100644
--- a/sky/framework/editing/editable_text.dart
+++ b/sky/framework/editing/editable_text.dart
@@ -32,6 +32,10 @@ class EditableText extends Component {
EditableText({Object key, this.value, this.focused})
: super(key: key, stateful: true) {
+ onDidUnmount(() {
+ if (_cursorTimer != null)
+ _stopCursorTimer();
+ });
}
void _cursorTick(Timer timer) {
@@ -52,11 +56,6 @@ class EditableText extends Component {
_showCursor = false;
}
- void didUnmount() {
- if (_cursorTimer != null)
- _stopCursorTimer();
- }
-
Node build() {
if (focused && _cursorTimer == null)
_startCursorTimer();
« no previous file with comments | « sky/framework/components/scrollable.dart ('k') | sky/framework/fn.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698