mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-25 17:51:27 +01:00
Fix comment hotkeys for FF and IE. Props azaozz, SergeyBiryukov. fixes #20885
git-svn-id: http://core.svn.wordpress.org/trunk@21035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e04cfd76f5
commit
4fbec0661f
@ -51,10 +51,12 @@ USAGE:
|
|||||||
|
|
||||||
// inspect if keystroke matches
|
// inspect if keystroke matches
|
||||||
var inspector = function(event) {
|
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;
|
var element = event.target;
|
||||||
// @ TextNode -> nodeType == 3
|
// @ 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
|
if(opt['disableInInput']) { // Disable shortcut keys in Input, Textarea fields
|
||||||
var target = jQuery(element);
|
var target = jQuery(element);
|
||||||
@ -76,11 +78,12 @@ USAGE:
|
|||||||
// in opera + safari, the event.target is unpredictable.
|
// in opera + safari, the event.target is unpredictable.
|
||||||
// for example: 'keydown' might be associated with HtmlBodyElement
|
// for example: 'keydown' might be associated with HtmlBodyElement
|
||||||
// or the element where you last clicked with your mouse.
|
// 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){
|
while (!that.all[element] && element.parentNode){
|
||||||
element = element.parentNode;
|
element = element.parentNode;
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
var cbMap = that.all[element].events[type].callbackMap;
|
var cbMap = that.all[element].events[type].callbackMap;
|
||||||
if(!shift && !ctrl && !alt && !meta) { // No Modifiers
|
if(!shift && !ctrl && !alt && !meta) { // No Modifiers
|
||||||
mapPoint = cbMap[special] || cbMap[character]
|
mapPoint = cbMap[special] || cbMap[character]
|
||||||
|
Loading…
Reference in New Issue
Block a user