From c068718fa04139f9a5215b92fb0139612830f127 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Fri, 7 Aug 2020 12:50:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20ueditor=20=E5=BF=AB?= =?UTF-8?q?=E9=80=9F=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=20session=20?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/ueditor/1.4/ueditor.all.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/core/src/main/resources/static/ueditor/1.4/ueditor.all.js b/modules/core/src/main/resources/static/ueditor/1.4/ueditor.all.js index 198cc473..eeb0a1b9 100644 --- a/modules/core/src/main/resources/static/ueditor/1.4/ueditor.all.js +++ b/modules/core/src/main/resources/static/ueditor/1.4/ueditor.all.js @@ -24454,6 +24454,7 @@ UE.plugin.register('simpleupload', function (){ var w = containerBtn.offsetWidth || 20, h = containerBtn.offsetHeight || 20, btnIframe = document.createElement('iframe'), + btnIframe2 = document.createElement('iframe'), // ThinkGem btnStyle = 'display:block;width:' + w + 'px;height:' + h + 'px;overflow:hidden;border:0;margin:0;padding:0;position:absolute;top:0;left:0;filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity: 0;opacity: 0;cursor:pointer;'; domUtils.on(btnIframe, 'load', function(){ @@ -24471,9 +24472,13 @@ UE.plugin.register('simpleupload', function (){ 'style="' + btnStyle + '">' + '' + - '' + - ''; + '';// + + //''; + // 解决因 iframe 嵌套问题 session 丢失 ThinkGem + btnIframe2.id = 'edui_iframe_' + timestrap; + btnIframe2.name = 'edui_iframe_' + timestrap; + wrapper.className = 'edui-' + me.options.theme; wrapper.id = me.ui.id + '_iframeupload'; btnIframeBody.style.cssText = btnStyle; @@ -24488,7 +24493,7 @@ UE.plugin.register('simpleupload', function (){ var form = btnIframeDoc.getElementById('edui_form_' + timestrap); var input = btnIframeDoc.getElementById('edui_input_' + timestrap); - var iframe = btnIframeDoc.getElementById('edui_iframe_' + timestrap); + var iframe = btnIframe2;//btnIframeDoc.getElementById('edui_iframe_' + timestrap); domUtils.on(input, 'change', function(){ if(!input.value) return; @@ -24573,6 +24578,10 @@ UE.plugin.register('simpleupload', function (){ btnIframe.style.cssText = btnStyle; containerBtn.appendChild(btnIframe); + + // 解决因 iframe 嵌套问题 session 丢失 ThinkGem + btnIframe2.style.cssText = 'display:none;width:0;height:0;border:0;margin:0;padding:0;position:absolute;'; + containerBtn.appendChild(btnIframe2); } return {