aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-08-26 14:10:33 +0200
committerGitHub <noreply@github.com>2020-08-26 14:10:33 +0200
commit1a5fff4c169dbaa2df72c656868bcf60ed4413d0 (patch)
treedd65e0714de02841bb368dce9c7c4cbaa5e8e7a0
parenta1e619b03a557b47c3e26a5e74af12b63a0d5e73 (diff)
downloadjquery-1a5fff4c169dbaa2df72c656868bcf60ed4413d0.tar.gz
jquery-1a5fff4c169dbaa2df72c656868bcf60ed4413d0.zip
Event: Remove the event.which shim
All supported browsers implement this property by themselves. The shim was only needed for IE <9. Fixes gh-3235 Closes gh-4765 Ref gh-4755
-rw-r--r--src/event.js34
1 files changed, 2 insertions, 32 deletions
diff --git a/src/event.js b/src/event.js
index 96056a138..b8c5e96fe 100644
--- a/src/event.js
+++ b/src/event.js
@@ -11,10 +11,7 @@ import nodeName from "./core/nodeName.js";
import "./core/init.js";
import "./selector.js";
-var
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
+var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
function returnTrue() {
return true;
@@ -717,34 +714,7 @@ jQuery.each( {
targetTouches: true,
toElement: true,
touches: true,
-
- which: function( event ) {
- var button = event.button;
-
- // Add which for key events
- if ( event.which == null && rkeyEvent.test( event.type ) ) {
- return event.charCode != null ? event.charCode : event.keyCode;
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
- if ( button & 1 ) {
- return 1;
- }
-
- if ( button & 2 ) {
- return 3;
- }
-
- if ( button & 4 ) {
- return 2;
- }
-
- return 0;
- }
-
- return event.which;
- }
+ which: true
}, jQuery.event.addProp );
jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
c_checksum_in_bulk_upload'>artonge/support_oc_checksum_in_bulk_upload Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/OCS/Result.php
blob: 8f42179f1a00360c48a4da13751858efcdf8ddf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160