This repository was archived by the owner on Feb 11, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ var mouseEvents = {
87
87
if ( ! this . isEventSimulatedFromTouch ( inEvent ) ) {
88
88
var e = this . prepareEvent ( inEvent ) ;
89
89
if ( ! HAS_BUTTONS ) { this . prepareButtonsForMove ( e , inEvent ) ; }
90
+ e . button = - 1 ;
90
91
dispatcher . move ( e ) ;
91
92
}
92
93
} ,
@@ -109,7 +110,8 @@ var mouseEvents = {
109
110
// FF Ubuntu includes the lifted button in the `buttons` property on
110
111
// mouseup.
111
112
// https://bugzilla.mozilla.org/show_bug.cgi?id=1223366
112
- if ( e . buttons === 0 || e . buttons === BUTTON_TO_BUTTONS [ e . button ] ) {
113
+ e . buttons &= ~ BUTTON_TO_BUTTONS [ e . button ] ;
114
+ if ( e . buttons === 0 ) {
113
115
this . cleanupMouse ( ) ;
114
116
dispatcher . up ( e ) ;
115
117
} else {
@@ -121,13 +123,15 @@ var mouseEvents = {
121
123
if ( ! this . isEventSimulatedFromTouch ( inEvent ) ) {
122
124
var e = this . prepareEvent ( inEvent ) ;
123
125
if ( ! HAS_BUTTONS ) { this . prepareButtonsForMove ( e , inEvent ) ; }
126
+ e . button = - 1 ;
124
127
dispatcher . enterOver ( e ) ;
125
128
}
126
129
} ,
127
130
mouseout : function ( inEvent ) {
128
131
if ( ! this . isEventSimulatedFromTouch ( inEvent ) ) {
129
132
var e = this . prepareEvent ( inEvent ) ;
130
133
if ( ! HAS_BUTTONS ) { this . prepareButtonsForMove ( e , inEvent ) ; }
134
+ e . button = - 1 ;
131
135
dispatcher . leaveOut ( e ) ;
132
136
}
133
137
} ,
Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ define({
27
27
] ,
28
28
functionalSuites : [
29
29
30
- // See: https://github.com/jquery/PEP/issues/173
31
- // 'tests/functional/pointerevent_button_attribute_mouse-manual',
30
+ 'tests/functional/pointerevent_button_attribute_mouse-manual' ,
32
31
'tests/functional/pointerevent_capture_mouse-manual' ,
33
32
'tests/functional/pointerevent_capture_suppressing_mouse-manual' ,
34
33
You can’t perform that action at this time.
0 commit comments