Commit 1dc6944b authored by Alexey Golubev's avatar Alexey Golubev Committed by GitHub

Merge pull request #184 from ONLYOFFICE/feature/v5.0.3.2

Feature/v5.0.3.2
parents 4e4c44a3 f0d5a7aa
...@@ -106,9 +106,8 @@ ...@@ -106,9 +106,8 @@
if (window.captureEvents) if (window.captureEvents)
window.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP); window.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP);
var _frame = document.getElementById("plugin_iframe"); if (window.g_asc_plugins)
if (_frame) window.g_asc_plugins.disablePointerEvents();
_frame.style.pointerEvents = "none";
/* /*
var parent = window; var parent = window;
...@@ -140,9 +139,8 @@ ...@@ -140,9 +139,8 @@
if (window.releaseEvents) if (window.releaseEvents)
window.releaseEvents(Event.MOUSEMOVE); window.releaseEvents(Event.MOUSEMOVE);
var _frame = document.getElementById("plugin_iframe"); if (window.g_asc_plugins)
if (_frame) window.g_asc_plugins.enablePointerEvents();
_frame.style.pointerEvents = "";
/* /*
var parent = window; var parent = window;
......
...@@ -1251,11 +1251,7 @@ ...@@ -1251,11 +1251,7 @@
if (!this.pluginsManager) if (!this.pluginsManager)
return; return;
var _pluginData = new Asc.CPluginData(); this.pluginsManager.onEnableMouseEvents(isEnable);
_pluginData.setAttribute("type", "enableMouseEvent");
_pluginData.setAttribute("isEnabled", isEnable);
this.pluginsManager.sendMessage(_pluginData);
}; };
baseEditorsApi.prototype["pluginMethod_GetFontList"] = function() baseEditorsApi.prototype["pluginMethod_GetFontList"] = function()
......
...@@ -1227,9 +1227,8 @@ ...@@ -1227,9 +1227,8 @@
} }
else if (data.type === "onExternalPluginMessage") else if (data.type === "onExternalPluginMessage")
{ {
var _iframe = document.getElementById("plugin_iframe"); if (window.g_asc_plugins)
if (_iframe) window.g_asc_plugins.sendToAllPlugins(event.data);
_iframe.contentWindow.postMessage(event.data, "*");
} }
} catch (err) } catch (err)
{ {
......
This diff is collapsed.
...@@ -3067,9 +3067,8 @@ ScrollObject.prototype = { ...@@ -3067,9 +3067,8 @@ ScrollObject.prototype = {
var evt = e || window.event; var evt = e || window.event;
// prevent pointer events on all iframes (while only plugin!) // prevent pointer events on all iframes (while only plugin!)
var _frame = document.getElementById("plugin_iframe"); if (window.g_asc_plugins)
if (_frame) window.g_asc_plugins.enablePointerEvents();
_frame.style.pointerEvents = "";
if ( evt.preventDefault ) if ( evt.preventDefault )
evt.preventDefault(); evt.preventDefault();
...@@ -3115,9 +3114,8 @@ ScrollObject.prototype = { ...@@ -3115,9 +3114,8 @@ ScrollObject.prototype = {
var evt = e || window.event; var evt = e || window.event;
// prevent pointer events on all iframes (while only plugin!) // prevent pointer events on all iframes (while only plugin!)
var _frame = document.getElementById("plugin_iframe"); if (window.g_asc_plugins)
if (_frame) window.g_asc_plugins.disablePointerEvents();
_frame.style.pointerEvents = "none";
// если сделать превент дефолт - перестанет приходить mousemove от window // если сделать превент дефолт - перестанет приходить mousemove от window
/* /*
......
...@@ -1784,7 +1784,7 @@ ...@@ -1784,7 +1784,7 @@
if (document.activeElement) if (document.activeElement)
{ {
var _id = document.activeElement.id; var _id = document.activeElement.id;
if (_id == "area_id" || _id == "plugin_iframe") if (_id == "area_id" || (window.g_asc_plugins && window.g_asc_plugins.checkRunnedFrameId(_id)))
return; return;
} }
......
...@@ -5908,7 +5908,7 @@ background-repeat: no-repeat;\ ...@@ -5908,7 +5908,7 @@ background-repeat: no-repeat;\
var top = ((height / 2) - (h / 2)) + dualScreenTop; var top = ((height / 2) - (h / 2)) + dualScreenTop;
var _windowPos = "width=" + w + ",height=" + h + ",left=" + left + ",top=" + top; var _windowPos = "width=" + w + ",height=" + h + ",left=" + left + ",top=" + top;
this.reporterWindow = window.open("index.reporter.html", "_blank", "resizable=0,status=0,toolbar=0,location=0,menubar=0,directories=0,scrollbars=0," + _windowPos); this.reporterWindow = window.open("index.reporter.html", "_blank", "resizable=yes,status=0,toolbar=0,location=0,menubar=0,directories=0,scrollbars=0," + _windowPos);
if (!this.reporterWindow) if (!this.reporterWindow)
return; return;
......
...@@ -409,6 +409,7 @@ ...@@ -409,6 +409,7 @@
this.documents = _docs; this.documents = _docs;
this.returnDocuments = []; this.returnDocuments = [];
this.current = -1; this.current = -1;
this.guid = "";
this.start = function() this.start = function()
{ {
...@@ -417,14 +418,14 @@ ...@@ -417,14 +418,14 @@
this.api.incrementCounterLongAction(); this.api.incrementCounterLongAction();
if (window.g_asc_plugins) if (window.g_asc_plugins)
window.g_asc_plugins.setPluginMethodReturnAsync(); this.guid = window.g_asc_plugins.setPluginMethodReturnAsync();
this.run(); this.run();
}; };
this.end = function() this.end = function()
{ {
if (window.g_asc_plugins) if (window.g_asc_plugins)
window.g_asc_plugins.onPluginMethodReturn(this.returnDocuments); window.g_asc_plugins.onPluginMethodReturn(this.guid, this.returnDocuments);
delete this.api.__content_control_worker; delete this.api.__content_control_worker;
this.api.decrementCounterLongAction(); this.api.decrementCounterLongAction();
......
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