Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
dc878ae3
Commit
dc878ae3
authored
Sep 22, 2011
by
Rick Waldron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More ref localization
parent
7dab8981
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
event.js
src/event.js
+15
-10
No files found.
src/event.js
View file @
dc878ae3
...
...
@@ -1071,14 +1071,18 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
if
(
rkeyEvent
.
test
(
name
)
)
{
jQuery
.
event
.
propHooks
[
name
]
=
function
(
event
,
original
)
{
var
charCode
=
event
.
charCode
,
keyCode
=
event
.
keyCode
,
ctrlKey
=
event
.
ctrlKey
;
// Add which for key events
if
(
event
.
which
==
null
&&
(
event
.
charCode
!=
null
||
event
.
keyCode
!=
null
)
)
{
event
.
which
=
event
.
charCode
!=
null
?
event
.
charCode
:
event
.
keyCode
;
if
(
event
.
which
==
null
&&
(
charCode
!=
null
||
keyCode
!=
null
)
)
{
event
.
which
=
charCode
!=
null
?
charCode
:
keyCode
;
}
// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
if
(
!
event
.
metaKey
&&
event
.
ctrlKey
)
{
event
.
metaKey
=
event
.
ctrlKey
;
if
(
!
event
.
metaKey
&&
ctrlKey
)
{
event
.
metaKey
=
ctrlKey
;
}
return
event
;
...
...
@@ -1089,13 +1093,14 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
if
(
rmouseEvent
.
test
(
name
)
)
{
jQuery
.
event
.
propHooks
[
name
]
=
function
(
event
,
original
)
{
var
eventDocument
,
doc
,
body
;
var
eventDoc
,
doc
,
body
,
button
=
event
.
button
;
// Calculate pageX/Y if missing and clientX/Y available
if
(
event
.
pageX
==
null
&&
event
.
clientX
!=
null
)
{
eventDoc
ument
=
event
.
target
.
ownerDocument
||
document
;
doc
=
eventDoc
ument
.
documentElement
;
body
=
eventDoc
ument
.
body
;
eventDoc
=
event
.
target
.
ownerDocument
||
document
;
doc
=
eventDoc
.
documentElement
;
body
=
eventDoc
.
body
;
event
.
pageX
=
event
.
clientX
+
(
doc
&&
doc
.
scrollLeft
||
body
&&
body
.
scrollLeft
||
0
)
-
(
doc
&&
doc
.
clientLeft
||
body
&&
body
.
clientLeft
||
0
);
event
.
pageY
=
event
.
clientY
+
(
doc
&&
doc
.
scrollTop
||
body
&&
body
.
scrollTop
||
0
)
-
(
doc
&&
doc
.
clientTop
||
body
&&
body
.
clientTop
||
0
);
...
...
@@ -1103,8 +1108,8 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
// Add which for click: 1 === left; 2 === middle; 3 === right
// Note: button is not normalized, so don't use it
if
(
!
event
.
which
&&
event
.
button
!==
undefined
)
{
event
.
which
=
(
event
.
button
&
1
?
1
:
(
event
.
button
&
2
?
3
:
(
event
.
button
&
4
?
2
:
0
)
));
if
(
!
event
.
which
&&
button
!==
undefined
)
{
event
.
which
=
(
button
&
1
?
1
:
(
button
&
2
?
3
:
(
button
&
4
?
2
:
0
)
));
}
return
event
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment