Hi there,
I've got a WebDataMenu which is used to open a new window when clicking on a menu item. In firefox, when I click the link, the window opens fine and the focus is correct - on the new window. In IE, however, when I click the link, the new window opens up, but focus is immediately removed from the new window and given to the opening window. I've attempted to put in a window.focus() call at the end of my click handler, but it looks as though the focus is being stolen after the click handler has finished executing. Is there a way of ensuring the newly opened window retains the focus for IE?
Thanks!
Hello kslone,
I tried to reproduce the issue with DataMenuItem with NavigateUrl ( Target="_blank") in order to open new window.
<ig:WebDataMenu ID="WebDataMenu1" runat="server">
<Items>
<ig:DataMenuItem Text="Root Item">
<ig:DataMenuItem Text="Google" NavigateUrl="http://google.com" Target="_blank">
</ig:DataMenuItem>
<ig:DataMenuItem Text="Infragistics" NavigateUrl="http://infragistics.com" Target="_blank">
</Items>
</ig:WebDataMenu>
I was not able to encounter the issue with InternetExplorer.
Do you another approach in order to achieve this?
Let me know if you need further assistance.
The location of the window to open is dynamic, so I'm using a call to window.open instead of specifying a url with target _blank.
Hello,
I used ItemClick client event in order to reproduce the behavior.
I was not able to encounter the described issue.
<ClientEvents ItemClick="WebDataMenu1_ItemClick" />
function WebDataMenu1_ItemClick(sender, eventArgs)
{
///<summary>
///
///</summary>
///<param name="sender" type="Infragistics.Web.UI.WebDataMenu"></param>
///<param name="eventArgs" type="Infragistics.Web.UI.DataMenuItemCancelEventArgs"></param>
//Add code to handle your event here.
window.open('http://www.google.bg/search?q=' + eventArgs.getItem().get_text() , '_blank');
}
Please feel free modify my code snippet in order to reproduce the issue or provide us with an example replicating it.
Hope hearing from you.
I'm having the same issue on IE8. I'm in the middle of upgrading v7.2 to v12.1 (12.1.20121.2119 to be specific). The data menu is dynamically generated via the sitemap structure. Prior to the upgrade, the selection of the data item within the menu correctly created a new window page with focus. Now, after the upgrade, the new window is created but loses focus and immediately minimizes causing the users to think that the new page didn't get created.
I also think it has to do with the javascript embedded within the new controls, specifically igDataMenuItem.js. I tried updating that javascript file in the ig_common\scripts directory, but the application doesn't appear to load the updated version, but rather continues to load the embedded version.
Two questions:1. How do I fix this focus issue?2. How do I have the app to use the javascript file that I updated in the ig_common\scripts directory instead of the version embedded in the controls?