Bug Tracker

Ticket #3027: focus_doubble.patch

File focus_doubble.patch, 1.2 KB (added by trixi, 12 years ago)
  • event.js

     
    202202                        if ( handle )
    203203                                val = handle.apply( elem, data );
    204204
    205                         // Handle triggering native .onfoo handlers (and on links since we don't call .click() for links)
    206                         if ( (!fn || (jQuery.nodeName(elem, 'a') && type == "click")) && elem["on"+type] && elem["on"+type].apply( elem, data ) === false )
     205                        // Handle triggering native .onfoo handlers (and on links since we don't call .click() for links) and focus cause ie would throw 2 events
     206                        if ( (!fn || (jQuery.nodeName(elem, 'a') && type == "click") || type == "focus") && elem["on"+type] && elem["on"+type].apply( elem, data ) === false )
    207207                                val = false;
    208208
    209209                        // Extra functions don't get the custom event object
     
    220220                        }
    221221
    222222                        // Trigger the native events (except for clicks on links)
    223                         if ( fn && donative !== false && val !== false && !(jQuery.nodeName(elem, 'a') && type == "click") ) {
     223                        if ( fn && donative !== false && val !== false && !(jQuery.nodeName(elem, 'a') && type == "click") && type != "focus" ) {
    224224                                this.triggered = true;
    225225                                try {
    226226                                        elem[ type ]();