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
c80ad252
Commit
c80ad252
authored
Sep 23, 2011
by
Rick Waldron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
current state
parent
c7f3b610
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
event.js
src/event.js
+14
-5
No files found.
src/event.js
View file @
c80ad252
...
@@ -475,7 +475,7 @@ jQuery.event = {
...
@@ -475,7 +475,7 @@ jQuery.event = {
return
event
.
result
;
return
event
.
result
;
},
},
props
:
"altKey attr
Change attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta
which"
.
split
(
" "
),
props
:
"altKey attr
Name bubbles button cancelable charCode ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view
which"
.
split
(
" "
),
propHooks
:
{},
propHooks
:
{},
...
@@ -487,13 +487,17 @@ jQuery.event = {
...
@@ -487,13 +487,17 @@ jQuery.event = {
// store a copy of the original event object
// store a copy of the original event object
// and "clone" to set read-only properties
// and "clone" to set read-only properties
var
originalEvent
=
event
,
var
originalEvent
=
event
,
propHook
;
propHook
=
jQuery
.
event
.
propHooks
[
event
.
type
],
copy
=
this
.
props
;
event
=
jQuery
.
Event
(
originalEvent
);
event
=
jQuery
.
Event
(
originalEvent
);
propHook
=
jQuery
.
event
.
propHooks
[
event
.
type
];
for
(
var
i
=
this
.
props
.
length
,
prop
;
i
;
)
{
if
(
propHook
)
{
prop
=
this
.
props
[
--
i
];
copy
.
push
.
apply
(
copy
,
propHook
()
||
[]
);
}
for
(
var
i
=
copy
.
length
,
prop
;
i
;
)
{
prop
=
copy
[
--
i
];
event
[
prop
]
=
originalEvent
[
prop
];
event
[
prop
]
=
originalEvent
[
prop
];
}
}
...
@@ -1093,6 +1097,10 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
...
@@ -1093,6 +1097,10 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
if
(
rmouseEvent
.
test
(
name
)
)
{
if
(
rmouseEvent
.
test
(
name
)
)
{
jQuery
.
event
.
propHooks
[
name
]
=
function
(
event
,
original
)
{
jQuery
.
event
.
propHooks
[
name
]
=
function
(
event
,
original
)
{
if
(
!
event
)
{
return
"layerX layerY clientX clientY offsetX offsetY wheelDelta"
.
split
(
" "
);
}
var
eventDoc
,
doc
,
body
,
var
eventDoc
,
doc
,
body
,
button
=
event
.
button
;
button
=
event
.
button
;
...
@@ -1111,6 +1119,7 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
...
@@ -1111,6 +1119,7 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
if
(
!
event
.
which
&&
button
!==
undefined
)
{
if
(
!
event
.
which
&&
button
!==
undefined
)
{
event
.
which
=
(
button
&
1
?
1
:
(
button
&
2
?
3
:
(
button
&
4
?
2
:
0
)
));
event
.
which
=
(
button
&
1
?
1
:
(
button
&
2
?
3
:
(
button
&
4
?
2
:
0
)
));
}
}
return
event
;
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