Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

关于 Edge 浏览器下无法加载编辑器问题 #114

Closed
lujiaxing opened this issue Feb 12, 2019 · 1 comment
Closed

关于 Edge 浏览器下无法加载编辑器问题 #114

lujiaxing opened this issue Feb 12, 2019 · 1 comment

Comments

@lujiaxing
Copy link
Contributor

lujiaxing commented Feb 12, 2019

问题描述:
如图所示. 在 Edge (42.17134.1.0) 浏览器下, 加载编辑器内部页面失败. 有时会提示

0 Permission Denied

有时候则无任何提示. 但编辑器同样无法输入内容, 无法进行任何后续操作.
但是有时候首次打开这个网页后却又一切正常.

image

image

问题根源在此:

container.appendChild(

具体是因为 Edge 不支持 javascript: 这个 URI Scheme 还是因为 javascript:void(); 和运用网站域名不同触发同源策略限制导致此问题这点依然存疑.

建议修改:
(此方案非通用方案, 仅供参考)

           var newContentIframe = domUtils.createElement(document, 'iframe', {
               id: 'ueditor_' + me.uid,
               name: 'ueditor_' + me.uid,
               width: "100%",
               height: "100%",
               frameborder: "0",
               src: ""
           });

            var form = domUtils.createElement(document, "form", {
                action: "/File/UEditorContentPage",
                target: ueditor_" + me.uid,
                method: "POST",
                style: "width:0px; height:0px; position:fixed;"
            });

          var 
          iframeCssUrlInput = domUtils.createElement(document, "input", {
            name: "IframeCssUrl", 
            value: options.iframeCssUrl ? utils.unhtml(options.iframeCssUrl) : ""
          }),
          initialStyleInput = domUtils.createElement(document, "input", {
            name: "InitialStyle", 
            value: options.initialStyle || ""
          }),
          isIEInput = domUtils.createElement(document, "input", {
            name: "IsIE", 
            value: ie ? "True" : "False"
          }),
          uidInput = domUtils.createElement(document, "input", {
            name: "UID", 
            value: me.uid
          });

          form.appendChild(iframeCssUrlInput);
          form.appendChild(initialStyleInput );
          form.appendChild(isIEInput);
          form.appendChild(uidInput);

           container.appendChild(newContentIframe);             
           form.submit();

/File/UEditorContentPage 为服务器端渲染的页面. 代替原有的 javascript:void(function(){.....}); 和 "html" 变量的工作, 完成了内嵌页面的初始化和渲染. 这只是临时方案. 不能永久如此.

注: UEditor 同存在此问题.

btw: edge sucks.

@lujiaxing lujiaxing changed the title Edge 浏览器下无法加载编辑器问题 关于 Edge 浏览器下无法加载编辑器问题 Feb 12, 2019
@zuohuadong
Copy link
Member

edge 暂时不打算支持了, 官方也换 chromium 内核

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants