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

Unified Diff: example/todomvc/web/editable_label.dart

Issue 22254002: fixes for latest SDK (Closed) Base URL: https://github.com/dart-lang/web-ui.git@master
Patch Set: fix comments Created 7 years, 4 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
Index: example/todomvc/web/editable_label.dart
diff --git a/example/todomvc/web/editable_label.dart b/example/todomvc/web/editable_label.dart
index 5239abae59a0b7a58648959b3dcce8bfdc3df4ba..374b7b1f0cfb8617a34dc4c27c9fbae50ac8b4c1 100644
--- a/example/todomvc/web/editable_label.dart
+++ b/example/todomvc/web/editable_label.dart
@@ -17,34 +17,19 @@ class EditableLabel extends PolymerElement with ObservableMixin {
@observable String value = '';
bool get applyAuthorStyles => true;
- // TODO(jmesserly): replace this with allowing not-operator in templates.
- bool get notEditing => !editing;
-
InputElement get _editBox => getShadowRoot("editable-label").query('#edit');
- void created() {
- super.created();
-
- bindProperty(this, const Symbol('editing'),
- () => notifyProperty(this, const Symbol('notEditing')));
- }
-
void edit() {
editing = true;
// This causes _editBox to be inserted.
- Observable.dirtyCheck();
+ performMicrotaskCheckpoint();
- // 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;
- }));
+ // 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) {

Powered by Google App Engine
This is Rietveld 408576698