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
c228874d
Commit
c228874d
authored
Dec 26, 2012
by
Dave Methvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove try/catch around focus events needed by oldIE.
parent
69bab502
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
15 deletions
+4
-15
event.js
src/event.js
+4
-15
No files found.
src/event.js
View file @
c228874d
...
@@ -291,9 +291,8 @@ jQuery.event = {
...
@@ -291,9 +291,8 @@ jQuery.event = {
!
(
type
===
"click"
&&
jQuery
.
nodeName
(
elem
,
"a"
))
&&
jQuery
.
acceptData
(
elem
)
)
{
!
(
type
===
"click"
&&
jQuery
.
nodeName
(
elem
,
"a"
))
&&
jQuery
.
acceptData
(
elem
)
)
{
// Call a native DOM method on the target with the same name name as the event.
// Call a native DOM method on the target with the same name name as the event.
// Can't use an .isFunction() check here because IE6/7 fails that test.
// Don't do default actions on window, that's where global variables be (#6170)
// Don't do default actions on window, that's where global variables be (#6170)
if
(
ontype
&&
elem
[
type
]
&&
!
jQuery
.
isWindow
(
elem
)
)
{
if
(
ontype
&&
jQuery
.
isFunction
(
elem
[
type
]
)
&&
!
jQuery
.
isWindow
(
elem
)
)
{
// Don't re-trigger an onFOO event when we call its FOO() method
// Don't re-trigger an onFOO event when we call its FOO() method
old
=
elem
[
ontype
];
old
=
elem
[
ontype
];
...
@@ -304,12 +303,7 @@ jQuery.event = {
...
@@ -304,12 +303,7 @@ jQuery.event = {
// Prevent re-triggering of the same event, since we already bubbled it above
// Prevent re-triggering of the same event, since we already bubbled it above
jQuery
.
event
.
triggered
=
type
;
jQuery
.
event
.
triggered
=
type
;
try
{
elem
[
type
]();
elem
[
type
]();
}
catch
(
e
)
{
// IE<9 dies on focus/blur to hidden element (#1486,#12518)
// only reproducible on winXP IE8 native, not IE9 in IE8 mode
}
jQuery
.
event
.
triggered
=
undefined
;
jQuery
.
event
.
triggered
=
undefined
;
if
(
old
)
{
if
(
old
)
{
...
@@ -498,13 +492,8 @@ jQuery.event = {
...
@@ -498,13 +492,8 @@ jQuery.event = {
// Fire native event if possible so blur/focus sequence is correct
// Fire native event if possible so blur/focus sequence is correct
trigger
:
function
()
{
trigger
:
function
()
{
if
(
this
!==
document
.
activeElement
&&
this
.
focus
)
{
if
(
this
!==
document
.
activeElement
&&
this
.
focus
)
{
try
{
this
.
focus
();
this
.
focus
();
return
false
;
return
false
;
}
catch
(
e
)
{
// IE<9 dies on focus to hidden element (#1486,#12518)
// If this happens, let .trigger() run the handlers
}
}
}
},
},
delegateType
:
"focusin"
delegateType
:
"focusin"
...
...
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