Commit a9bf5f3b authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Добавил прерывание выполнения undo/redo браузера (иначе в textarea срабатывали...

Добавил прерывание выполнения undo/redo браузера (иначе в textarea срабатывали стандартные undo/redo).
Баг http://bugzserver/show_bug.cgi?id=24473

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56401 954022d7-b5bf-4e40-9824-e11837661b57
parent 8c5560df
...@@ -365,6 +365,7 @@ ...@@ -365,6 +365,7 @@
}; };
CellEditor.prototype.undoAll = function () { CellEditor.prototype.undoAll = function () {
this.isUpdateValue = false;
this.undoAllMode = true; this.undoAllMode = true;
while (this.undoList.length > 0) { while (this.undoList.length > 0) {
this.undo(); this.undo();
...@@ -857,9 +858,8 @@ ...@@ -857,9 +858,8 @@
var isFormula = s.charAt(0) === "="; var isFormula = s.charAt(0) === "=";
var funcPos, funcName, match; var funcPos, funcName, match;
if (!t.isTopLineActive || !t.skipTLUpdate || t.undoMode) { if (!t.isTopLineActive || !t.skipTLUpdate || t.undoMode)
t.input.value = s; t.input.value = s;
}
if (isFormula) { if (isFormula) {
funcPos = asc_lastidx(s, t.reNotFormula, t.cursorPos) + 1; funcPos = asc_lastidx(s, t.reNotFormula, t.cursorPos) + 1;
...@@ -1796,6 +1796,8 @@ ...@@ -1796,6 +1796,8 @@
case 89: // ctrl + y case 89: // ctrl + y
case 90: // ctrl + z case 90: // ctrl + z
if (ctrlKey) { if (ctrlKey) {
event.stopPropagation();
event.preventDefault();
if (!t.hasFocus) {t.setFocus(true);} if (!t.hasFocus) {t.setFocus(true);}
event.which === 90 ? t.undo() : t.redo(); event.which === 90 ? t.undo() : t.redo();
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment