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
00274391
Commit
00274391
authored
Jul 04, 2006
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a fix for IE for binding events onto IFrame content.
parent
8a97cd67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
jquery.js
jquery/jquery.js
+17
-11
No files found.
jquery/jquery.js
View file @
00274391
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
window
.
undefined
=
window
.
undefined
;
window
.
undefined
=
window
.
undefined
;
// Map over the $ in case of overwrite
// Map over the $ in case of overwrite
if
(
$
)
var
.
_$
=
$
;
if
(
$
)
var
_$
=
$
;
/**
/**
* Create a new jQuery Object
* Create a new jQuery Object
...
@@ -804,15 +804,20 @@ jQuery.event = {
...
@@ -804,15 +804,20 @@ jQuery.event = {
},
},
handle
:
function
(
event
)
{
handle
:
function
(
event
)
{
if
(
!
event
&&
!
window
.
event
)
return
;
// Handle adding events to items in IFrames, in IE
event
=
event
||
jQuery
.
event
.
fix
(
((
this
.
ownerDocument
||
this
.
document
||
this
).
parentWindow
||
window
).
event
);
// If no correct event was found, fail
if
(
!
event
)
return
;
var
returnValue
=
true
,
handlers
=
[];
var
returnValue
=
true
,
handlers
=
[];
event
=
event
||
jQuery
.
event
.
fix
(
window
.
event
);
for
(
var
j
in
this
.
events
[
event
.
type
]
)
for
(
var
j
in
this
.
events
[
event
.
type
]
)
handlers
[
handlers
.
length
]
=
this
.
events
[
event
.
type
][
j
];
handlers
[
handlers
.
length
]
=
this
.
events
[
event
.
type
][
j
];
for
(
var
i
=
0
;
i
<
handlers
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
handlers
.
length
;
i
++
)
if
(
handlers
[
i
].
constructor
==
Function
)
{
if
(
handlers
[
i
].
constructor
==
Function
)
{
this
.
handleEvent
=
handlers
[
i
];
this
.
handleEvent
=
handlers
[
i
];
if
(
this
.
handleEvent
(
event
)
===
false
)
{
if
(
this
.
handleEvent
(
event
)
===
false
)
{
...
@@ -821,18 +826,19 @@ jQuery.event = {
...
@@ -821,18 +826,19 @@ jQuery.event = {
returnValue
=
false
;
returnValue
=
false
;
}
}
}
}
}
return
returnValue
;
return
returnValue
;
},
},
fix
:
function
(
event
)
{
fix
:
function
(
event
)
{
event
.
preventDefault
=
function
()
{
if
(
event
)
{
this
.
returnValue
=
false
;
event
.
preventDefault
=
function
()
{
};
this
.
returnValue
=
false
;
};
event
.
stopPropagation
=
function
()
{
event
.
stopPropagation
=
function
()
{
this
.
cancelBubble
=
true
;
this
.
cancelBubble
=
true
;
};
};
}
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