| Index: example/todomvc/web/editable_label.dart
|
| diff --git a/example/todomvc/web/editable_label.dart b/example/todomvc/web/editable_label.dart
|
| index 3d72ed713d03da1e54ed53c8780355e5d2a20eef..5239abae59a0b7a58648959b3dcce8bfdc3df4ba 100644
|
| --- a/example/todomvc/web/editable_label.dart
|
| +++ b/example/todomvc/web/editable_label.dart
|
| @@ -5,7 +5,7 @@
|
| library editable_label;
|
|
|
| import 'dart:html';
|
| -import 'package:observe/observe.dart';
|
| +import 'dart:async';
|
| import 'package:polymer/polymer.dart';
|
|
|
| /**
|
| @@ -33,13 +33,18 @@ class EditableLabel extends PolymerElement with ObservableMixin {
|
| editing = true;
|
|
|
| // This causes _editBox to be inserted.
|
| - deliverChangeRecords();
|
| + Observable.dirtyCheck();
|
|
|
| - // For IE and Firefox: use .focus(), then reset the value to move the
|
| - // cursor to the end.
|
| - _editBox.focus();
|
| - _editBox.value = '';
|
| - _editBox.value = value;
|
| + // TODO(sigmund): remove the 2 runAsync calls. To do so, we might want to
|
| + // make dirtyCheck return a future or something to indicate that all
|
| + // change propagations are done.
|
| + runAsync(() => runAsync(() {
|
| + // For IE and Firefox: use .focus(), then reset the value to move the
|
| + // cursor to the end.
|
| + _editBox.focus();
|
| + _editBox.value = '';
|
| + _editBox.value = value;
|
| + }));
|
| }
|
|
|
| void update(Event e) {
|
| @@ -55,3 +60,8 @@ class EditableLabel extends PolymerElement with ObservableMixin {
|
| }
|
| }
|
| }
|
| +
|
| +@polymerInitMethod
|
| +void _init() {
|
| + registerPolymerElement('editable-label', () => new EditableLabel());
|
| +}
|
|
|