File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 7
7
( function ( scope ) {
8
8
var dispatcher = scope . dispatcher ;
9
9
var captureInfo = dispatcher . captureInfo ;
10
+ var findTarget = scope . findTarget ;
10
11
var allShadows = scope . targetFinding . allShadows . bind ( scope . targetFinding ) ;
11
12
var pointermap = dispatcher . pointermap ;
12
13
var touchMap = Array . prototype . map . call . bind ( Array . prototype . map ) ;
143
144
}
144
145
return ret ;
145
146
} ,
146
- findTarget : function ( ev ) {
147
- if ( this . currentTouchEvent . type === 'touchstart' ) {
148
- return this . currentTouchEvent . target ;
149
- }
150
- return scope . findTarget ( ev ) ;
151
- } ,
152
147
touchToPointer : function ( inTouch ) {
153
148
var cte = this . currentTouchEvent ;
154
149
var e = dispatcher . cloneEvent ( inTouch ) ;
155
150
// Spec specifies that pointerId 1 is reserved for Mouse.
156
151
// Touch identifiers can start at 0.
157
152
// Add 2 to the touch identifier for compatibility.
158
153
var id = e . pointerId = inTouch . identifier + 2 ;
159
- e . target = captureInfo [ id ] || this . findTarget ( e ) ;
154
+ e . target = captureInfo [ id ] || findTarget ( e ) ;
160
155
e . bubbles = true ;
161
156
e . cancelable = true ;
162
157
e . detail = this . clickCount ;
158
+ e . button = 0 ;
163
159
e . buttons = this . typeToButtons ( cte . type ) ;
164
160
e . width = inTouch . webkitRadiusX || inTouch . radiusX || 0 ;
165
161
e . height = inTouch . webkitRadiusY || inTouch . radiusY || 0 ;
You can’t perform that action at this time.
0 commit comments