aboutsummaryrefslogtreecommitdiffstats
path: root/src/event.js
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2012-12-26 17:52:04 -0500
committerDave Methvin <dave.methvin@gmail.com>2012-12-26 17:52:04 -0500
commitc228874db1f70f79b2a0ed4ea4aa1352420a1e2d (patch)
tree386488c060848b72cd155675bbfb4fe63f78f243 /src/event.js
parent69bab50296f945de1da3d0e75992a8210bc5427c (diff)
downloadjquery-c228874db1f70f79b2a0ed4ea4aa1352420a1e2d.tar.gz
jquery-c228874db1f70f79b2a0ed4ea4aa1352420a1e2d.zip
Remove try/catch around focus events needed by oldIE.
Diffstat (limited to 'src/event.js')
-rw-r--r--src/event.js19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/event.js b/src/event.js
index f49438106..28689e21c 100644
--- a/src/event.js
+++ b/src/event.js
@@ -291,9 +291,8 @@ jQuery.event = {
!(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.
- // 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)
- 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
old = elem[ ontype ];
@@ -304,12 +303,7 @@ jQuery.event = {
// Prevent re-triggering of the same event, since we already bubbled it above
jQuery.event.triggered = type;
- try {
- 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
- }
+ elem[ type ]();
jQuery.event.triggered = undefined;
if ( old ) {
@@ -498,13 +492,8 @@ jQuery.event = {
// Fire native event if possible so blur/focus sequence is correct
trigger: function() {
if ( this !== document.activeElement && this.focus ) {
- try {
- this.focus();
- return false;
- } catch ( e ) {
- // IE<9 dies on focus to hidden element (#1486,#12518)
- // If this happens, let .trigger() run the handlers
- }
+ this.focus();
+ return false;
}
},
delegateType: "focusin"