[FIXED] [#1155] [4.0] Ext.net.ComponentLoader load mode behavior different than was configured
I think there's a wrong behaviour in Ext.net.ComponentLoader. It assumes load mode as 'iframe' if the load url contains other domain instead of do what is configured. This is very strange considering the possible use of something like enable cross-origin resource sharing, or even a wrapper around XMLHttpRequest that use window.postMessage to communicate with other domains.
Here is a example using tooltip:
Domain 1 (http://localhost:11111):
ExampleController.cs
Code:
using System.Web.Mvc;
namespace SandBox.Controllers
{
public class ExampleController : System.Web.Mvc.Controller
{
public ActionResult Tooltip() => View();
}
}
Tooltip.aspx
HTML Code:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html>
<html>
<head runat="server">
</head>
<body>
<ext:ResourceManager runat="server" ScriptMode="Debug" />
<div id="ajax-tip" class="tip-target">Ajax ToolTip</div>
<ext:ToolTip
runat="server"
Target="ajax-tip"
Width="200">
<Loader runat="server" Url="http://localhost:22222/Example/TooltipContent" Mode="Html">
<LoadMask ShowMask="true" />
</Loader>
</ext:ToolTip>
</body>
</html>
Domain 2 (http://localhost:22222):
ExampleController.cs
Code:
using System.Web.Mvc;
namespace SandBox.Controllers
{
public class ExampleController : System.Web.Mvc.Controller
{
public ActionResult TooltipContent() => Content("<ul><li>Item 1</li><li>Item2</li><li>Item3</li></ul>");
}
}
See that the content of tooltip is loaded inside an iframe.
Thanks.