Commit 4cca5761 authored by GoshaZotov's avatar GoshaZotov

copy/paste in top line

parent 9683c702
......@@ -472,10 +472,6 @@ var editor;
return;
}
var result = this.wb.copyToClipboardButton();
this.wb.restoreFocus();
return result;
};
spreadsheet_api.prototype.asc_Paste = function() {
......@@ -497,10 +493,6 @@ var editor;
return;
}
var result = this.wb.pasteFromClipboardButton();
this.wb.restoreFocus();
return result;
};
spreadsheet_api.prototype.asc_Cut = function() {
......@@ -522,10 +514,6 @@ var editor;
return;
}
var result = this.wb.cutToClipboardButton();
this.wb.restoreFocus();
return result;
};
spreadsheet_api.prototype.asc_PasteData = function(_format, data1, data2)
......@@ -1988,9 +1976,15 @@ var editor;
spreadsheet_api.prototype.asc_IsFocus = function(bIsNaturalFocus) {
var res = true;
if (this.wb) {
if(this.wb.cellEditor.isTopLineActive)
{
res = false;
}
else if (this.wb)
{
res = this.wb.getEnableKeyEventsHandler(bIsNaturalFocus);
}
return res;
};
......
......@@ -265,7 +265,11 @@
_private_onbeforepaste : function(e, isAttackEmulate)
{
this._console_log("onbeforepaste");
//TODO условие добавил, чтобы не терялся фокус со строки формул при copy/paste. проверить!
if (!this.Api.asc_IsFocus(true))
return;
//if (isAttackEmulate === true)
{
this.CommonDiv = this.CommonDiv_Check();
......@@ -299,7 +303,11 @@
_private_onbeforecopy : function(e, isAttackEmulate)
{
this._console_log("onbeforecopy");
//TODO условие добавил, чтобы не терялся фокус со строки формул при copy/paste. проверить!
if (!this.Api.asc_IsFocus(true))
return;
//if (isAttackEmulate === true)
{
this.CommonDiv = this.CommonDiv_Check();
......
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