Commit 4cca5761 authored by GoshaZotov's avatar GoshaZotov

copy/paste in top line

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