Commit ed02ca4b authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

корректировка copy/paste для chrome mac

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50517 954022d7-b5bf-4e40-9824-e11837661b57
parent 1eee3ee9
......@@ -761,6 +761,7 @@
_editorPaste: function (worksheet,callback) {
var t = this;
window.GlobalPasteFlagCounter = 1;
isTruePaste = false;
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
document.body.style.MozUserSelect = "text";
delete document.body.style["-khtml-user-select"];
......@@ -817,9 +818,7 @@
}
}*/
if(!is_chrome)
t._editorPasteExec(worksheet, pastebin);
else if(is_chrome && !isTruePaste)
if(!isTruePaste)
t._editorPasteExec(worksheet, pastebin);
pastebin.style.display = ELEMENT_DISPAY_STYLE;
......@@ -1026,7 +1025,7 @@
}
if(null != sHtml)
{
t._addHtmlToIframe(worksheet,sHtml,isText);
t._addHtmlToIframe(worksheet,sHtml,isText,e);
}
else
{
......@@ -1054,9 +1053,10 @@
}
},
_addHtmlToIframe: function(worksheet,sHtml,isText)
_addHtmlToIframe: function(worksheet,sHtml,isText,e)
{
var t = this;
var bExist = false;
//Записываем html в IFrame
var ifr = document.getElementById("pasteFrame");
if (!ifr)
......@@ -1081,15 +1081,23 @@
frameWindow.document.write(sHtml);
frameWindow.document.close();
var bodyFrame = frameWindow.document.body;
isTruePaste = false;
if(bodyFrame && bodyFrame != null)
{
t._editorPasteExec(worksheet, frameWindow.document.body,isText);
isTruePaste = true;
bExist = true;
}
bExist = true;
ifr.style.display = ELEMENT_DISPAY_STYLE;
}
if(bExist)
{
isTruePaste = true;
if (e.preventDefault)
{
e.stopPropagation();
e.preventDefault();
}
return false;
}
ifr.style.display = ELEMENT_DISPAY_STYLE;
},
_copyPasteCorrectString: function (str)
{
......
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