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
29386db3
Commit
29386db3
authored
Apr 06, 2011
by
Dave Methvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sadly, we still have to bubble the event so inline handlers will work.
parent
246757ba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
event.js
src/event.js
+4
-5
No files found.
src/event.js
View file @
29386db3
...
@@ -71,8 +71,8 @@ jQuery.event = {
...
@@ -71,8 +71,8 @@ jQuery.event = {
if
(
!
eventHandle
)
{
if
(
!
eventHandle
)
{
elemData
.
handle
=
eventHandle
=
function
(
e
)
{
elemData
.
handle
=
eventHandle
=
function
(
e
)
{
//
Handle the second event of a trigger and when
//
Discard the second event of a jQuery.event.trigger() and
// an event is called after a page has unloaded
//
when
an event is called after a page has unloaded
return
typeof
jQuery
!==
"undefined"
&&
jQuery
.
event
.
triggered
!==
e
.
type
?
return
typeof
jQuery
!==
"undefined"
&&
jQuery
.
event
.
triggered
!==
e
.
type
?
jQuery
.
event
.
handle
.
apply
(
eventHandle
.
elem
,
arguments
)
:
jQuery
.
event
.
handle
.
apply
(
eventHandle
.
elem
,
arguments
)
:
undefined
;
undefined
;
...
@@ -281,7 +281,6 @@ jQuery.event = {
...
@@ -281,7 +281,6 @@ jQuery.event = {
// Event object or event type
// Event object or event type
var
type
=
event
.
type
||
event
,
var
type
=
event
.
type
||
event
,
ontype
=
"on"
+
type
,
ontype
=
"on"
+
type
,
handling
=
jQuery
.
event
.
global
,
namespaces
=
[],
namespaces
=
[],
cur
=
elem
;
cur
=
elem
;
...
@@ -313,7 +312,7 @@ jQuery.event = {
...
@@ -313,7 +312,7 @@ jQuery.event = {
event
.
stopPropagation
();
event
.
stopPropagation
();
// Save some time, only trigger if we've ever bound an event for this type
// Save some time, only trigger if we've ever bound an event for this type
if
(
handling
[
type
]
)
{
if
(
jQuery
.
event
.
global
[
type
]
)
{
// XXX This code smells terrible. event.js should not be directly
// XXX This code smells terrible. event.js should not be directly
// inspecting the data cache
// inspecting the data cache
jQuery
.
each
(
jQuery
.
cache
,
function
()
{
jQuery
.
each
(
jQuery
.
cache
,
function
()
{
...
@@ -361,7 +360,7 @@ jQuery.event = {
...
@@ -361,7 +360,7 @@ jQuery.event = {
}
catch
(
ieError1
)
{}
}
catch
(
ieError1
)
{}
cur
=
cur
.
parentNode
||
cur
.
ownerDocument
;
cur
=
cur
.
parentNode
||
cur
.
ownerDocument
;
}
while
(
cur
&&
!
event
.
isPropagationStopped
()
&&
handling
[
type
]
);
}
while
(
cur
&&
!
event
.
isPropagationStopped
()
);
// If nobody prevented the default action, do it now
// If nobody prevented the default action, do it now
if
(
!
event
.
isDefaultPrevented
()
)
{
if
(
!
event
.
isDefaultPrevented
()
)
{
...
...
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