| 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..ab3f0b594e50522c84e3bf0893575cebd4d49051 100644
|
| --- a/example/todomvc/web/editable_label.dart
|
| +++ b/example/todomvc/web/editable_label.dart
|
| @@ -5,13 +5,14 @@
|
| library editable_label;
|
|
|
| import 'dart:html';
|
| -import 'package:observe/observe.dart';
|
| +import 'dart:async';
|
| import 'package:polymer/polymer.dart';
|
|
|
| /**
|
| * Label whose [value] can be edited by double clicking. When editing, it
|
| * displays a form and input element, otherwise it displays the label.
|
| */
|
| +@CustomTag('editable-label')
|
| class EditableLabel extends PolymerElement with ObservableMixin {
|
| @observable bool editing = false;
|
| @observable String value = '';
|
| @@ -33,13 +34,18 @@ class EditableLabel extends PolymerElement with ObservableMixin {
|
| editing = true;
|
|
|
| // This causes _editBox to be inserted.
|
| - deliverChangeRecords();
|
| -
|
| - // For IE and Firefox: use .focus(), then reset the value to move the
|
| - // cursor to the end.
|
| - _editBox.focus();
|
| - _editBox.value = '';
|
| - _editBox.value = value;
|
| + Observable.dirtyCheck();
|
| +
|
| + // 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) {
|
|
|