When I type ctrl-z, the undo action is performed twice. Not handling the "y"
and "z" event in util.addEvent() in Markdown.Editor.js line 1255 corrects this
problem.
util.addEvent(inputBox, keyEvent, function (key) {
// Check to see if we have a button key and, if so execute the callback.
if ((key.ctrlKey || key.metaKey) && !key.altKey && !key.shiftKey) {
var keyCode = key.charCode || key.keyCode;
var keyCodeStr = String.fromCharCode(keyCode).toLowerCase();
switch (keyCodeStr) {
....
case "h":
doClick(buttons.heading);
break;
case "r":
doClick(buttons.hr);
break;
case "y":
//doClick(buttons.redo);
break;
case "z":
//if (key.shiftKey) {
// doClick(buttons.redo);
//}
//else {
// doClick(buttons.undo);
//}
break;
default:
return;
}
Original issue reported on code.google.com by freepl...@gmail.com on 1 Jun 2013 at 4:02
Original issue reported on code.google.com by
freepl...@gmail.com
on 1 Jun 2013 at 4:02