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

http://bugzserver/show_bug.cgi?id=24834 - Ошибки в консоли при вставке...

http://bugzserver/show_bug.cgi?id=24834 -  Ошибки в консоли при вставке содержимого в Chrome, скопированного из IE

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@65188 954022d7-b5bf-4e40-9824-e11837661b57
parent a6478e96
......@@ -51,7 +51,21 @@
if (!t.element) {
t.element = doc.getElementById(COPY_ELEMENT_ID2);
if (!t.element) {found = false; t.element = doc.createElement("DIV");}
if (!t.element)
{
found = false;
if(AscBrowser.isIE)
{
var iframe = doc.createElement("iframe");
iframe.id = "ieCopyFrame";
doc.body.appendChild(iframe);
var temp = doc.getElementById("ieCopyFrame");
t.element = temp.contentDocument.body.appendChild(doc.createElement("div"));
}
else
t.element = doc.createElement("DIV");
}
}
t.element.id = COPY_ELEMENT_ID2;
......@@ -73,7 +87,7 @@
t.element.style.display = ELEMENT_DISPAY_STYLE;
t.element.setAttribute("contentEditable", true);
if (!found) {doc.body.appendChild(t.element);}
if (!found && !AscBrowser.isIE) {doc.body.appendChild(t.element);}
//fix for ipad
if(!AscBrowser.isMobileVersion)
......@@ -2782,7 +2796,7 @@
_selectElement: function (callback, copyCellValue) {
var t = this, selection, rangeToSelect, overflowBody, firstWidth;
overflowBody = document.body.style.overflow;
overflowBody = document.body.style.overflow;
if(copyCellValue)
{
firstWidth = t.element.style.width;
......@@ -2836,7 +2850,7 @@
if(firstWidth)
t.element.style.width = firstWidth;
document.body.style.overflow = overflowBody;
// for paste event
if (callback && callback.call) {callback();}
},
......
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