OLD | NEW |
1 part of touch; | |
2 | |
3 // 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 |
4 // 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 |
5 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
6 | 4 |
7 /** | 5 /** |
8 * Common events related helpers. | 6 * Common events related helpers. |
9 */ | 7 */ |
10 class EventUtil { | 8 class EventUtil { |
11 | 9 |
12 /** | 10 /** |
(...skipping 19 matching lines...) Expand all Loading... |
32 * one). If there is no currently focused element then this function will do | 30 * 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. | 31 * nothing. For most browsers this will cause the keyboard to be dismissed. |
34 */ | 32 */ |
35 static void blurFocusedElement() { | 33 static void blurFocusedElement() { |
36 Element focusedEl = document.query("*:focus"); | 34 Element focusedEl = document.query("*:focus"); |
37 if (focusedEl != null) { | 35 if (focusedEl != null) { |
38 focusedEl.blur(); | 36 focusedEl.blur(); |
39 } | 37 } |
40 } | 38 } |
41 } | 39 } |
OLD | NEW |