I have a complete ASP.NET that makes heavy usage of your DevExpress ASPx suite of controls. Grids, text boxes, round panels etc.
THe site works flawlessly in Chrome, Firefox however in IE some UI does not function. Example, i have an ASPxComboBox control. In IE it doesn't "Drop down".
Using F12 developer tools on the console line the following shows as the error code when the dropdown should fire
SCRIPT87: Invalid argument.
DXR.axd?r=1_42-DSzC3, line 1268 character
The function is below, line 1268 is line 5 in the code below
function _aspxCreateStyleSheetInDocument(doc) {
if(__aspxIE)
return doc.createStyleSheet();
else {
var styleSheet = doc.createElement("STYLE");
_aspxGetChildByTagName(doc, "HEAD", 0).appendChild(styleSheet);
return styleSheet.sheet;
}
}
Any suggestions where to start ?
Is resource merging enabled in web.config?
<devExpress>
...
<compression enableHtmlCompression="false" enableCallbackCompression="true"
enableResourceCompression="true" enableResourceMerging="true" />
...
</devExpress>
This issue is a specific of the IE browser (it can be encountered when too many stylesheet links are registered within a page). To resolve this issue, it is recommended that you enable “Resource Merging” http://help.devexpress.com/#AspNet/CustomDocument6911 option.
If AutoFormats/Themes are used, deploy controls skin via the «ASPxThemeDeployer” http://help.devexpress.com/#AspNet/CustomDocument7485 tool in the “Only skin files” mode.
See Also:
http://www.devexpress.com/kb=K18487
Related
I am working on Dynamics CRM 2011 (UR13) and trying to display an HTML Web resource (which contains a Silverlight XAP file) as a Modal Dialog from a Ribbon Button.
The Ribbon action XML is as below. More or like the MSDN examples.
<Actions>
<Url Address="$webresource:new_Wizard.htm" PassParams="true" WinMode="1" WinParams="dialogHeight=100; dialogWidth=100" />
</Actions>
In both Chrome and Firefox, the dialogHeight and dialogWidth values are honoured.
However, in IE9 (the RTM supported version) these are ignored and the pop-up window is huge (almost full screen).
Has anyone else seen this behaviour or know a workaround?
Best Regards,
Shaun Harvey
I am opening up the HTML Web Resource from a Javascript Function instead (triggered by the click of the Ribbon Button).
This function uses the Xrm.Utility.openWebResource() method introduced in Roll-Up 8 of CRM 2011.
http://msdn.microsoft.com/en-gb/library/jj602956(v=crm.5).aspx
The Function call allows you to specify the web resource URL, and the size of the pop-up window.
Xrm.Utility.openWebResource("new_webResource.htm?typename=account&userlcid=1033", null, 300, 300);
This seems to be rendered properly by all three of the browsers.
As a possible workaround you can choose one of 2 options:
1. Add OnLoad javascript to your html webresourse that will set correct size to your dialog window.
2. Replace action with JavaScript function that will open your dialog window with proper sizing.
I have a telerik rad editor. My application runs in .net 2.0 environment. The telerik version is : 2012.3.1016.35. The rad editor is not enabled on chrome only. I cannot type into it.Works fine in all other browsers. Upgrading to new telerik is not an option. Because this is an old client and changing will/may affect other styling things.
So what are my options. I posted this on telerik, but no response. If you need more information, please let me know. Thanks.
EDIT:
ON checking the console I got an error. Please find the image attached to see the error.
SOLUTION:
I got it. I had a line like below to open a rad window:
rwSC.VisibleOnPageLoad = True
This was causing the problem. Sometimes it would open fast and the control would load and I can place my cursor within the rad editor within the rad window and sometimes cannot. So I replaced that with this
Javascript.RegisterStartupScript(Me, "NewSC", "setTimeout(""$find('" & rwSC.ClientID & "').show();"", 500);", True)
And now it works. The rad editor within the radwindow is enabled and I can edit it.
Is this what you have: http://feedback.telerik.com/Project/108/Feedback/Details/125713?
If so, try the JS workaround there
After utterly disbelieving our client when they claimed they couldn't type full stops (periods) into the HTML Editor control of the Ajax Control Toolkit on their ASP.net site, I've now sadly been forced to accept it is the case.
When you press the . key, and the cursor is at the final position in the editor nothing is added to the HTML Editor control at all.
If there are any characters after the cursor position, the . works normally.
If you hit return to enter a newline, and press . it works once.
This only only occurs in IE 11, older versions of it are fine, as are Chrome, Firefox and Safari. We are using the September 2013 release of Ajax Control Toolkit.
Has anyone else encountered this? Any advice would be much appreciated.
After doing more googling specifically around AjaxControlToolkit and IE11, I found a number of people complaining about problems with the current version of ACT (the Sept 2013 release) and IE11.
e.g. Here, here and here
It seems the problem is with .net failing to identify IE 11 as an IE browser, causing various AjaxControlToolkit features to fail.
The workaround I'm using at present is to add the X-UA-Compatible http header to our site, to force IE11 to process the page with in IE10 mode.
<meta http-equiv="X-UA-Compatible" content="IE=10">
There is also this .net4 hotfix from Microsoft which should fix the problem completely when applied to your web server.
Hope this helps someone else.
I found a similar problem with v3.0.30930 in Chrome, I tracked it down to the DesignPanelEventHandler. Specifically when conditionally dealing with deletions in various browsers when clicking the backspace button. In certain situations the code looks for a keycode of 46 or Sys.UI.Key.backspace, however in Chrome the full-stop keycode on keypress is also 46, causing all sorts of problems and finally meaning the event is stopped and the full-stop is never entered into the panel.
I overrode the DesignPanelEventHandler functionality and added the following condition in before the deletion logic and stopping the event (around about line 503 in HTMLEditor\DesignPanelEventHandler.js). As far as my tests go this seems to work fine:
if (key != String.fromCharCode(Sys.UI.Key.backspace).toLowerCase())
break;
I have an ASP.NET page that contains an iframe. Inside that iframe, there is a form with a DefaultFocus and a DefaultButton set, as shown below.
<form id="Form1" method="post" runat="server" defaultfocus="txtSearchPhrase" defaultbutton="btnSearch">
When viewing this page in IE11, all of the content inside of the iframe appears to be shifted off the left side of the screen by about 100px or so. This does not happen in any other browser, including IE10.
If I remove the DefaultButton and DefaultFocus from the form, the problem disappears. I can then use Javascript to manually hookup the default button and focus, but since I have many different pages that are potentially rendered inside the iframe, it's not ideal to have to change each and every one of those pages.
Does anyone know what's causing this or if there's a better way to address it?
I looked into this and found some interesting things.
First, when you include DefaultFocus or DefaultButton on a form in ASP .NET WebForms, ASP .NET will automatically emit two things:
The definition of a WebForm_AutoFocus method.
A call to this method, which looks something like: WebForm_AutoFocus('defaultFocusElementID'); It does this for both DefaultFocus and DefaultButton settings, though I'm not sure why it needs to do this for the DefaultButton setting.
The WebForm_AutoFocus method attempts to call the scrollIntoView method on the element, but only if the browser is detected as a "non MS DOM" browser. Strangely enough, IE11 is not considered an MS DOM browser, at least as far as this method is concerned. So the scrollIntoView method is designed to run on browsers which are not IE.
I suppose one could argue the bug is with the implementation of the scrollIntoView method in IE11, but it could also be viewed as a bug in the MS JS library which detects whether the browser is an MS DOM browser. I'm not sure - either way, I blame Microsoft. :)
I recommend not using DefaultFocus and DefaultButton from a philosophical perspective because these are Microsoft-specific things, and when you can keep your code away from Microsoft-specific things, you usually should. Especially when using the "Microsoft way" is totally broken. Rather, try something like this (if you're using jQuery):
<form data-defaultfocus="search">
<asp:TextBox ID="search" />
</form>
<script type="text/javascript">
// jQuery on document ready
$(function() {
var form = $('form'),
defaultButtonID,
defaultFocusID;
if (form.data('defaultfocus')) {
defaultFocusID = form.data('defaultfocus');
$('#' + defaultFocusID).focus();
}
if (form.data('defaultbutton')) {
defaultButtonID = form.data('defaultbutton');
form.on('keypress', function(event) {
if (event.keyCode === 13) {
__doPostBack(defaultButtonID, '');
}
});
}
});
</script>
This is not tested code, but you get the idea. Then you can go through and use data-defaultbutton and data-defaultfocus on your form elements instead of the Microsofty way of doing it, and it will actually work, and if it doesn't, you can fix it, because you control the code!
I hope this helps.
Update
I found this Microsoft KB article which discusses a .NET 4 patch. Issue 2 on this page appears to address an issue which might be the one you described.
When you access an ASP.NET-based webpage by using Internet Explorer 11, the webpage renders the content incorrectly.
Note This issue occurs because Internet Explorer 11 is not recognized as Internet Explorer by ASP.NET.
I haven't tried it out yet, but it seems like this would fix it.
I'm using ASP.NET 4.5 on the server and I have a .NET Windows application with a Web Browser control that navigates to the web page on the server.
If I run the Windows application on a system with Internet Explorer 11, I get a script error: "Object doesn't support property or method 'attachEvent'" when navigating to another page. The script file is ScriptResource.axd so it isn't any of my scripts.
I do know that Internet Explorer 11 doesn't support attachEvent anymore (replaced with attachEventListener?). That is however not of much help here, as the javascript is part of the framework, not in my code.
I found the javascript source for the framework here:
http://ajaxcontroltoolkit.codeplex.com/SourceControl/latest#Client/MicrosoftAjax/Extensions/Sys/WebForms/PageRequestManager.js
// DevDiv Bugs 100201: IE does not set referrer header on redirect if you set window.location, inject anchor node instead
// dynamic anchor technique only works on IE
if (Sys.Browser.agent === Sys.Browser.InternetExplorer) {
var anchor = document.createElement("a");
anchor.style.display = 'none';
// cancel bubble so body.onclick is not raised
anchor.attachEvent("onclick", cancelBubble);
// more code...
}
This is the Sys.Webforms.PageRequestManager module that is part of the core ASP.NET framework as far as I understand.
The line that performs attachEvent gives script error on Internet Explorer 11, but works great on older versions of Internet Explorer.
How to fix this problem? Are there any known workarounds? I couldn't fine any updates for this.
Try forcing the browser to render in IE 10 mode...
<meta http-equiv="X-UA-Compatible" content="IE=10" />
I got that problem with jQuery 1.10 and it seems, that IE11 lacks the support of "attachEvent" which is used in jQuery and which seemed to be used by your framework as well. There is a Microsoft bugticket for that: Bugticket attachEvent IE11
I've found a solution in the related jQuery bugticket. Just insert the following code before your framework:
var isIE11 = !!(navigator.userAgent.match(/Trident/) && !navigator.userAgent.match(/MSIE/));
if (isIE11) {
if (typeof window.attachEvent == "undefined" || !window.attachEvent) {
window.attachEvent = window.addEventListener;
}
}
You first check if the browser is IE11 and then bind the attachEvent listener again so the error doesn't occur again.