使用command来劫持ctrl+f命令时,没有禁用浏览器的ctrl+f
var command = {
canUndo: false,
execute: function (context, options, isUndo) {
var commands = $3rd.spreadJS.Sheets.Commands
if (isUndo) {
commands.undoTransaction(context, options);
return true;
} else {
commands.startTransaction(context, options);
// 打开dialog
alert(1)
Commands.endTransaction(context, options);
return true;
}
}
};
commandManager.register("openFindDialog", command)
commandManager.setShortcutKey("openFindDialog", 70, true, false, false, false)
|
|