Use 'evt.shiftKey' instead of matching 'charCodes'
The shortcut wasn't running consistently and was blocking 'Cmd+L' on Chrome 38. Instead of going to the location bar it would tooggle the list. Strangely, it did not override 'Cmd+N'. Using `evt.shiftKey` instead of matching the `charCode` to the uppercase letter solves the problem.pull/2271/head
parent
68c805070a
commit
6f5f89bc6b
|
@ -3749,7 +3749,7 @@ function Ace2Inner(){
|
||||||
toggleAttributeOnSelection('strikethrough');
|
toggleAttributeOnSelection('strikethrough');
|
||||||
specialHandled = true;
|
specialHandled = true;
|
||||||
}
|
}
|
||||||
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which) == "L" && (evt.metaKey || evt.ctrlKey))
|
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "l" && (evt.metaKey || evt.ctrlKey) && evt.shiftKey)
|
||||||
{
|
{
|
||||||
// cmd-shift-L (unorderedlist)
|
// cmd-shift-L (unorderedlist)
|
||||||
fastIncorp(9);
|
fastIncorp(9);
|
||||||
|
@ -3757,7 +3757,7 @@ function Ace2Inner(){
|
||||||
doInsertUnorderedList()
|
doInsertUnorderedList()
|
||||||
specialHandled = true;
|
specialHandled = true;
|
||||||
}
|
}
|
||||||
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which) == "N" && (evt.metaKey || evt.ctrlKey))
|
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "n" && (evt.metaKey || evt.ctrlKey) && evt.shiftKey)
|
||||||
{
|
{
|
||||||
// cmd-shift-N (orderedlist)
|
// cmd-shift-N (orderedlist)
|
||||||
fastIncorp(9);
|
fastIncorp(9);
|
||||||
|
|
Loading…
Reference in New Issue