Commit 746f3904 authored by Oleg Korshul's avatar Oleg Korshul

fix Bug 35559

parent 569a4918
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
{ {
this.plugins = []; this.plugins = [];
this.current = null; this.current = null;
this.currentInit = false;
this.currentVariation = 0; this.currentVariation = 0;
this.path = "../../../../sdkjs-plugins/"; this.path = "../../../../sdkjs-plugins/";
this.api = null; this.api = null;
...@@ -153,7 +154,7 @@ ...@@ -153,7 +154,7 @@
}, },
close : function() close : function()
{ {
if (this.startData.getAttribute("resize") === true) if (this.startData && this.startData.getAttribute("resize") === true)
this.endLongAction(); this.endLongAction();
this.startData = null; this.startData = null;
...@@ -207,6 +208,8 @@ ...@@ -207,6 +208,8 @@
if (this.startData.getAttribute("resize") !== true) if (this.startData.getAttribute("resize") !== true)
this.api.sendEvent("asc_onPluginShow", this.current, this.currentVariation); this.api.sendEvent("asc_onPluginShow", this.current, this.currentVariation);
} }
this.currentInit = false;
}, },
buttonClick : function(id) buttonClick : function(id)
...@@ -219,6 +222,12 @@ ...@@ -219,6 +222,12 @@
if (-1 == id) if (-1 == id)
{ {
if (!this.currentInit)
{
window.g_asc_plugins.close();
this.close();
}
// защита от плохого плагина // защита от плохого плагина
this.closeAttackTimer = setTimeout(function() this.closeAttackTimer = setTimeout(function()
{ {
...@@ -285,6 +294,8 @@ ...@@ -285,6 +294,8 @@
this.startData.setAttribute("type", "init"); this.startData.setAttribute("type", "init");
_iframe.contentWindow.postMessage(this.startData.serialize(), "*"); _iframe.contentWindow.postMessage(this.startData.serialize(), "*");
} }
this.currentInit = true;
}, },
correctData : function(pluginData) correctData : function(pluginData)
{ {
......
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