[CLOSED] Open popup from grid in IE11

  1. #1

    [CLOSED] Open popup from grid in IE11

    Hi,

    I found a strange behaviour in IE11 when opening a popup from a grid: immediately after the popup opens, the page with the grid gets the focus, and the popup goes to background.
    This page reproduces the problem

    <%@ Page Language="C#" AutoEventWireup="true" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Test</title>
    </head>
    <body>
    	<script runat="server">
    		protected void Page_Load(object sender, EventArgs e)
    		{
    			if (!X.IsAjaxRequest)
    			{
    				storeTest.DataSource = GetData();
    				storeTest.DataBind();
    			}
    		}
    
    		private object[] GetData()
    		{
    			return new object[]
    			{
    				new object[] { 1, "row 1", "window.open('', 1, 'width=300, height=200');" },
    				new object[] { 2, "row 2", "window.open('', 2, 'width=300, height=200');" },
    				new object[] { 3, "row 3", "window.open('', 3, 'width=300, height=200');" }
    			};
    		}
    	</script>
    	<script type="text/javascript">
    		function renderer_description(value, metadata, record)
    		{
    			return "<span onclick=\"" + record.data.ScriptOpenPopup + "\">" + record.data.Description + "</span>";
    		}
    	</script>
        <form id="form1" runat="server">
    		<ext:ResourceManager runat="server" />
    		<ext:GridPanel runat="server" Width="400" Height="200">
    			<Store>
    				<ext:Store ID="storeTest" runat="server">
    					<Fields>
    						<ext:ModelField Name="RowID" Type="Int" />
    						<ext:ModelField Name="Description" Type="String" />
    						<ext:ModelField Name="ScriptOpenPopup" Type="String" />
    					</Fields>
    				</ext:Store>
    			</Store>
    			<ColumnModel>
    				<Columns>	
    					<ext:Column runat="server" DataIndex="RowID" Text="ID" />
    					<ext:Column runat="server" DataIndex="Description" Text="Element" Flex="1">
    						<Renderer Fn="renderer_description" />
    					</ext:Column>
    				</Columns>
    			</ColumnModel>
    		</ext:GridPanel>
        </form>
    </body>
    </html>
    In Chrome the popup remains in the foreground. Is this a bug? Any workarounds?
    Thanks
  2. #2
    Hello @moldeveloper!

    I didn't get this behavior here. In IE11 whenever the popup window displayed, it stood in foreground.

    I am afraid this is not something that can be handled by the code, it would be a browser-specific behavior. Actually I would expect the popup not to work at all when you published that page.

    Wouldn't that be a good idea to instead use modal windows on your page?
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hi Fabricio,

    I cannot use ext windows because the popups open different and very big pages.
    The problem is present on many PCs in our organization, and I have the latest version of IE11 (updated on 14 june) on Windows 7. Maybe it depends on some specific configuration enforced by group policy.
    At the moment I added an explicit window.focus() after a timeout of 1ms, the popup flashes a little but at least is usable.

    Thanks
  4. #4
    Okay, interesting! I've just run windows update yesterday, windows 8.1 here, and voila, I reproduce your issue!

    I couldn't find anything in IE settings by a first look that may suggest an option to revert to older behavior. I can guess this "feature" was made to hold back from sites that shows those huge maximized pop-up windows that tries to scam people around.

    Unfortunately if you can't rely on Ext.NET window there's not much else that can be done other that what you already did.

    By the way you can put whole pages into Ext windows or panels if you use a loader with iFrame. It would be equivalent to a new window that can be closed, may block input on parent window, or be collapsible, but well, only alternative I could think that would remove (or at least relax) your reliance on the clients' web browser.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] window.open Popup
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Apr 17, 2015, 1:45 PM
  2. [CLOSED] Script Error using open Popup page
    By speedstepmem4 in forum 2.x Legacy Premium Help
    Replies: 11
    Last Post: Oct 07, 2013, 1:23 PM
  3. [CLOSED] Open a modal popup from a modal popup
    By Aparna_B in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 24, 2012, 8:58 AM
  4. [CLOSED] popup open as topmost
    By Marcelo in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Oct 03, 2011, 6:58 PM
  5. [CLOSED] open popup window
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 06, 2009, 2:13 PM

Tags for this Thread

Posting Permissions