Message info
 
To:wp-svn@lists.automattic.com From:m@wordpress.org Subject:[wp-svn] [21035] trunk/wp-includes/js/jquery/jquery.hotkeys.dev.js: Fix comment hotkeys for FF and IE. Date:Sat, 9 Jun 2012 15:57:11 +0000 (UTC)
 

Revision
21035
Author
ryan
Date
2012-06-09 15:57:11 +0000 (Sat, 09 Jun 2012)

Log Message

Fix comment hotkeys for FF and IE. Props azaozz, SergeyBiryukov. fixes #20885

Modified Paths

Diff

Modified: trunk/wp-includes/js/jquery/jquery.hotkeys.dev.js (21034 => 21035)


--- trunk/wp-includes/js/jquery/jquery.hotkeys.dev.js	2012-06-08 23:02:40 UTC (rev 21034)
+++ trunk/wp-includes/js/jquery/jquery.hotkeys.dev.js	2012-06-09 15:57:11 UTC (rev 21035)
@@ -51,10 +51,12 @@
         
         // inspect if keystroke matches
         var inspector = function(event) {
-            event = jQuery.event.fix(event); // jQuery event normalization.
+            // WP: not needed with newer jQuery
+            // event = jQuery.event.fix(event); // jQuery event normalization.
             var element = event.target;
             // @ TextNode -> nodeType == 3
-            element = (element.nodeType==3) ? element.parentNode : element;
+            // WP: not needed with newer jQuery
+            // element = (element.nodeType==3) ? element.parentNode : element;
             
             if(opt['disableInInput']) { // Disable shortcut keys in Input, Textarea fields
                 var target = jQuery(element);
@@ -76,11 +78,12 @@
             // in opera + safari, the event.target is unpredictable.
             // for example: 'keydown' might be associated with HtmlBodyElement 
             // or the element where you last clicked with your mouse.
-            if (jQuery.browser.opera || jQuery.browser.safari){
+            // WP: needed for all browsers 
+            // if (jQuery.browser.opera || jQuery.browser.safari){
                 while (!that.all[element] && element.parentNode){
                     element = element.parentNode;
                 }
-            }
+            // }
             var cbMap = that.all[element].events[type].callbackMap;
             if(!shift && !ctrl && !alt && !meta) { // No Modifiers
                 mapPoint = cbMap[special] ||  cbMap[character]