diff --git a/source/Ox.UI/js/Core/Element.js b/source/Ox.UI/js/Core/Element.js index 664a2a40..4179684d 100644 --- a/source/Ox.UI/js/Core/Element.js +++ b/source/Ox.UI/js/Core/Element.js @@ -132,8 +132,11 @@ load: function init() { if (that.attr('src')) { // send oxid to iframe - that.postMessage({init: {oxid: that.oxid}}); - self.initTimeout = setTimeout(init, 250); + that.postMessage({init: {oxid: that.oxid}}); + self.initTime = self.initTime || new Date(); + if (new Date() < self.initTime + 60000) { + self.initTimeout = setTimeout(init, 250); + } } } }).bindEvent({ diff --git a/source/Ox.UI/js/Core/Event.js b/source/Ox.UI/js/Core/Event.js index a944d404..2c6343d7 100644 --- a/source/Ox.UI/js/Core/Event.js +++ b/source/Ox.UI/js/Core/Event.js @@ -222,9 +222,12 @@ // There actually is an outer window if (!Ox.oxid) { // Inner window has not received init message yet - setTimeout(function() { - that.postMessage.apply(that, arguments); - }, 250); + self.initTime = self.initTime || new Date(); + if (new Date() < self.initTime + 60000) { + setTimeout(function() { + that.postMessage.apply(that, arguments); + }, 250); + } } else { return Ox.Message.post.apply(this, arguments); }