OLD | NEW |
1 /** | 1 /** |
2 * @license | 2 * @license |
3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | 3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. |
4 * This code may only be used under the BSD style license found at http://polyme
r.github.io/LICENSE.txt | 4 * This code may only be used under the BSD style license found at http://polyme
r.github.io/LICENSE.txt |
5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.
txt | 5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.
txt |
6 * The complete set of contributors may be found at http://polymer.github.io/CON
TRIBUTORS.txt | 6 * The complete set of contributors may be found at http://polymer.github.io/CON
TRIBUTORS.txt |
7 * Code distributed by Google as part of the polymer project is also | 7 * Code distributed by Google as part of the polymer project is also |
8 * subject to an additional IP rights grant found at http://polymer.github.io/PA
TENTS.txt | 8 * subject to an additional IP rights grant found at http://polymer.github.io/PA
TENTS.txt |
9 */ | 9 */ |
10 | 10 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 } | 84 } |
85 | 85 |
86 function tap(node) { | 86 function tap(node) { |
87 var xy = middleOfNode(node); | 87 var xy = middleOfNode(node); |
88 down(node, xy); | 88 down(node, xy); |
89 up(node, xy); | 89 up(node, xy); |
90 makeEvent('tap', xy, node); | 90 makeEvent('tap', xy, node); |
91 } | 91 } |
92 | 92 |
93 function focus(target) { | 93 function focus(target) { |
94 Polymer.Base.fire.call(target, 'focus'); | 94 Polymer.Base.fire.call(target, 'focus', {}, { |
| 95 bubbles: false |
| 96 }); |
95 } | 97 } |
96 | 98 |
97 function blur(target) { | 99 function blur(target) { |
98 Polymer.Base.fire.call(target, 'blur'); | 100 Polymer.Base.fire.call(target, 'blur', {}, { |
| 101 bubbles: false |
| 102 }); |
99 } | 103 } |
100 | 104 |
101 function downAndUp(target, callback) { | 105 function downAndUp(target, callback) { |
102 down(target); | 106 down(target); |
103 Polymer.Base.async(function() { | 107 Polymer.Base.async(function() { |
104 up(target); | 108 up(target); |
105 tap(target); | 109 tap(target); |
106 | 110 |
107 callback && callback(); | 111 callback && callback(); |
108 }); | 112 }); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 track: track, | 172 track: track, |
169 pressAndReleaseKeyOn: pressAndReleaseKeyOn, | 173 pressAndReleaseKeyOn: pressAndReleaseKeyOn, |
170 pressEnter: pressEnter, | 174 pressEnter: pressEnter, |
171 pressSpace: pressSpace, | 175 pressSpace: pressSpace, |
172 keyDownOn: keyDownOn, | 176 keyDownOn: keyDownOn, |
173 keyUpOn: keyUpOn, | 177 keyUpOn: keyUpOn, |
174 middleOfNode: middleOfNode, | 178 middleOfNode: middleOfNode, |
175 topLeftOfNode: topLeftOfNode | 179 topLeftOfNode: topLeftOfNode |
176 }; | 180 }; |
177 })(this); | 181 })(this); |
OLD | NEW |