From 5df8ff2e523e1887eecb6bc698feb2ba9e85468a Mon Sep 17 00:00:00 2001 From: Manson Wang Date: Wed, 6 Nov 2013 16:48:56 +0800 Subject: [PATCH] By Ray, Fix structure page editing bug --- app/assets/javascripts/lib/items/items.js.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/lib/items/items.js.erb b/app/assets/javascripts/lib/items/items.js.erb index 46b1fa050..a70d7f765 100644 --- a/app/assets/javascripts/lib/items/items.js.erb +++ b/app/assets/javascripts/lib/items/items.js.erb @@ -132,7 +132,11 @@ function iFrameContent() { $('#pageslide_iframe').load(function() { var $iContents = $(this).contents(), $pc = $iContents.find('.page_content'); - $(this).get(0).contentWindow.externalFunction(iFrameFunction, $iContents, $pc); + try { + $(this).get(0).contentWindow.externalFunction(iFrameFunction, $iContents, $pc); + } catch(err) { + console.log(err); + } }); } function pageSetting(id, edit) {