Version 2013.2.717.45 still rendering attachEvent for IE11

10 posts, 0 answers
  1. Ken O.
    Ken O. avatar
    14 posts
    Member since:
    Jun 2012

    Posted 28 Mar 2014 Link to this post

    We are observing that even with recent version of Telerik ASP.NET Ajax Rad Controls, that the JavaScript is detecting for IE, and then rendering the attachEvent method. Unfortunately, this has been deprecated in IE11, so the code would better render if it detected for features (attachEvent) rather than browser.

    Relevant snippet of code from running the debugger as below. I am including an image taken from running the F12 debugger to show exactly what is failing. I tried to attach the ScriptResource.axd file, but am not able to attach in this forum because not allowed file type.
    if($telerik.isIE){document.attachEvent("onmousedown",this._onDocumentClickDelegate);<BR>document.attachEvent("oncontextmenu",this._onDocumentClickDelegate);<BR>}else{$telerik.addHandler(document,"mousedown",this._onDocumentClickDelegate);<BR>$telerik.addHandler(document,"contextmenu",this._onDocumentClickDelegate);
  2. Ken O.
    Ken O. avatar
    14 posts
    Member since:
    Jun 2012

    Posted 28 Mar 2014 in reply to Ken O. Link to this post

    I should add, I did read the pinned related post as below, but I don't think that is the problem, because the suggested hotfix does not apply to our web server, Windows Server 2012, and we do not have a App_Browsers folder.

    Incorrectly rendered webpage when using Internet Explorer 11
    http://www.telerik.com/forums/incorrectly-rendered-webpage-when-using-internet-explorer-11
  3. Nencho
    Admin
    Nencho avatar
    1864 posts

    Posted 02 Apr 2014 Link to this post

    Hello Ken,

    I have investigated the demonstrated code snippet and it seems that this implementation is contained in an older version then our latest official release - Q1 2014. Which version did you upgraded to? If this is the mentioned version, please clear the browser cashe and try if the problem still persist.

    Regards,
    Nencho
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  4. Ken O.
    Ken O. avatar
    14 posts
    Member since:
    Jun 2012

    Posted 03 Apr 2014 in reply to Nencho Link to this post

    Thanks Nencho. Some more details.

    I discovered that this issue is only present for one of our environments, it seems to work fine in all others. I checked the versions of the dlls for all environments, and it is the same throughout. Is there possibly some environmental configuration as to how Telerik controls renders the .axd / JavaScript?

    We are using version 2013.2.717.45. We just upgraded to this version, so am hoping to not have to upgrade again just to solve this problem. Our system is Windows Server 2012.

    It's not a browser cache issue, we had many people clear their caches, and every person is able to repro the issue.
  5. Nencho
    Admin
    Nencho avatar
    1864 posts

    Posted 08 Apr 2014 Link to this post

    Hello Ken,

    Indeed in the specified version, the attachment of the events is achieved using the attachEvent method.
    In the latest official release, this problem is fixed. Could you try to add the following workaround:

    <script type="text/javascript">
        Telerik.Web.UI.RadComboBox.prototype._initializeDocumentEvents = function () {
            this._onDocumentClickDelegate = Function.createDelegate(this, this._onDocumentClick);
     
            if ($telerik.isIE6) {
                document.attachEvent("onmousedown", this._onDocumentClickDelegate);
                document.attachEvent("oncontextmenu", this._onDocumentClickDelegate);
            }
            else {
                $telerik.addHandler(document, "mousedown", this._onDocumentClickDelegate);
                $telerik.addHandler(document, "contextmenu", this._onDocumentClickDelegate);
            }
        }
    </script>


    Regards,
    Nencho
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Ken O.
    Ken O. avatar
    14 posts
    Member since:
    Jun 2012

    Posted 09 Apr 2014 Link to this post

    Thanks so much Nencho! I have one other problem unfortunately. Using the same DLL's, we cannot repro this in our dev or test environment. The only environment this shows up in is our production environment, and they are not going to allow us to apply a patch until it goes through test. We did a file comparison, and the only difference between the environments was the web.config file.

    Can you suggest how to repro this in dev or test environment? We need to do this so that we can compare before and after. The test team requires to do a full regression of the entire web site / functionality, something that can't be done in production.
  7. Nencho
    Admin
    Nencho avatar
    1864 posts

    Posted 14 Apr 2014 Link to this post

    Hello Ken,

    Could you specify if you were able to test the provided workaround and whether it helped on the production? Generally the issue should be faced regardless of the deployment environment, since you mentioned that the version is the same. Could you double check if this is correct? You could be sure if you view the source of the page and search for <!-- 2013.2.717.45 -->.

    However, the previews implementation of the event attachment is as follows:
    <script type="text/javascript">
            Telerik.Web.UI.RadComboBox.prototype._initializeDocumentEvents = function () {
                this._onDocumentClickDelegate = Function.createDelegate(this, this._onDocumentClick);
     
                if ($telerik.isIE) {
                    document.attachEvent("onmousedown", this._onDocumentClickDelegate);
                    document.attachEvent("oncontextmenu", this._onDocumentClickDelegate);
                }
                else {
                    $telerik.addHandler(document, "mousedown", this._onDocumentClickDelegate);
                    $telerik.addHandler(document, "contextmenu", this._onDocumentClickDelegate);
                }
            }
        </script>

    You could try to add this implementation in the dev/test environment and try to reproduce the problem.

    Regards,
    Nencho
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  8. Ken O.
    Ken O. avatar
    14 posts
    Member since:
    Jun 2012

    Posted 17 Apr 2014 in reply to Nencho Link to this post

    Thanks Nencho. I compared, and both dev and production has the text you indicated, for 2013.2.717.45 in a comment.
    I just noticed a strange difference. The production code has the HTML declaration as below, whereas the dev environment code as seen in the browser does not have the section for class=" _Telerik_IE9". I'm really stumped by this.

    <html class=" _Telerik_IE9" xmlns="http://www.w3.org/1999/xhtml">
  9. Ken O.
    Ken O. avatar
    14 posts
    Member since:
    Jun 2012

    Posted 17 Apr 2014 in reply to Ken O. Link to this post

    I should have added one extra detail. In production, as it fails for IE 11 or edge mode, we are using following tag to force default to IE10 mode, whereas in dev we are able to use edge mode as desired. Without this change, production would be completely unusable.

    <meta http-equiv="X-UA-Compatible" content="IE-10"></meta>
  10. Nencho
    Admin
    Nencho avatar
    1864 posts

    Posted 22 Apr 2014 Link to this post

    Hello Ken,

    I would kindly like to ask you to submit a support ticket along with a runnable sample attached, demonstrating the problem, so we could perform some local test and pinpoint the problem.

    Regards,
    Nencho
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top