WordPress.org

Make WordPress Core

Ticket #20885: 20885.4.patch

File 20885.4.patch, 1.8 KB (added by SergeyBiryukov, 6 years ago)

Same as 20885-3.patch, with better formatting

  • wp-includes/js/jquery/jquery.hotkeys.dev.js

     
    5151       
    5252        // inspect if keystroke matches
    5353        var inspector = function(event) {
    54             event = jQuery.event.fix(event); // jQuery event normalization.
     54            // WP: not needed with newer jQuery
     55            // event = jQuery.event.fix(event); // jQuery event normalization.
    5556            var element = event.target;
    5657            // @ TextNode -> nodeType == 3
    57             element = (element.nodeType==3) ? element.parentNode : element;
     58            // WP: not needed with newer jQuery
     59            // element = (element.nodeType==3) ? element.parentNode : element;
    5860           
    5961            if(opt['disableInInput']) { // Disable shortcut keys in Input, Textarea fields
    6062                var target = jQuery(element);
     
    7678            // in opera + safari, the event.target is unpredictable.
    7779            // for example: 'keydown' might be associated with HtmlBodyElement
    7880            // or the element where you last clicked with your mouse.
    79             if (jQuery.browser.opera || jQuery.browser.safari){
     81            // WP: needed for all browsers
     82            // if (jQuery.browser.opera || jQuery.browser.safari){
    8083                while (!that.all[element] && element.parentNode){
    8184                    element = element.parentNode;
    8285                }
    83             }
     86            // }
    8487            var cbMap = that.all[element].events[type].callbackMap;
    8588            if(!shift && !ctrl && !alt && !meta) { // No Modifiers
    8689                mapPoint = cbMap[special] ||  cbMap[character]