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