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

Side by Side Diff: dart/samples/swarm/swarm_ui_lib/touch/EventUtil.dart

Issue 66253002: Version 0.8.10.9 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/samples/swarm/Views.dart ('k') | dart/samples/swarm/swarm_ui_lib/view/PagedViews.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of touch; 5 part of touch;
6 6
7 /** 7 /**
8 * Common events related helpers. 8 * Common events related helpers.
9 */ 9 */
10 class EventUtil { 10 class EventUtil {
(...skipping 15 matching lines...) Expand all
26 element.onBlur.listen((e) { subscription.cancel(); }); 26 element.onBlur.listen((e) { subscription.cancel(); });
27 } 27 }
28 } 28 }
29 29
30 /** 30 /**
31 * Clear the keyboard focus of the currently focused element (if there is 31 * Clear the keyboard focus of the currently focused element (if there is
32 * one). If there is no currently focused element then this function will do 32 * one). If there is no currently focused element then this function will do
33 * nothing. For most browsers this will cause the keyboard to be dismissed. 33 * nothing. For most browsers this will cause the keyboard to be dismissed.
34 */ 34 */
35 static void blurFocusedElement() { 35 static void blurFocusedElement() {
36 Element focusedEl = document.query("*:focus"); 36 Element focusedEl = document.querySelector("*:focus");
37 if (focusedEl != null) { 37 if (focusedEl != null) {
38 focusedEl.blur(); 38 focusedEl.blur();
39 } 39 }
40 } 40 }
41 } 41 }
OLDNEW
« no previous file with comments | « dart/samples/swarm/Views.dart ('k') | dart/samples/swarm/swarm_ui_lib/view/PagedViews.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698