[OPEN] [#924] [3.2.1] "Ext.require" does not fire callback on IE10

Page 1 of 2 12 LastLast
  1. #1

    [OPEN] [#924] [3.2.1] "Ext.require" does not fire callback on IE10

    Hi,

    we're experiencing an issue with Ext.Net 3.2.1. Basically it appears that the "Ext.require" callback on IE10 does not fire the "callback" freezing the UI (since the code on callback never get called!). We saw also that "Ext.syncRequire" works instead.

    Note that all works on IE9 and IE11...

    Sample code to reproduce:

    index.aspx

        <ext:ResourceManager
                ID="ExtNetResMgr"
                runat="server"
                Namespace="Portal"
                SourceFormatting="true"
                InitScriptMode="Inline"
                ScriptMode="Debug" />
    
        <script type="text/javascript">
            Ext.Loader.setConfig({
                enabled: true,
                disableCaching: false,
                paths: {
                    Test: '/Scripts'
                }
            });
    
            Ext.onReady(function () {
                Ext.require('Test.Debug', function () {
                    alert('require done');
                    Test.Debug.hello();
                });
            });
        </script>
    Scripts/debug.js

    Ext.ns('Test.Debug');
     
    Test.Debug = {
        hello: function () { alert('Hello');}
    };
    Thank you for help
    Last edited by Daniil; Oct 20, 2015 at 2:54 PM. Reason: [OPEN] [#924] [3.2.1]
  2. #2
    Hi @adrianot,

    Thank you for the report!

    Created an Issue:
    https://github.com/extnet/Ext.NET/issues/924

    There is a problem in IE10. I think it is discussed in details here:
    https://github.com/cujojs/curl/issues/131

    At this moment, I am not sure we'll be able to fix it in Ext.NET and most likely we'll have to wait when it is fixed in ExtJS.

    Would it be appropriate for you to use Ext.syncRequire in IE10?
  3. #3
    Hi Daniil, thank you for the answer.

    Yes, we can use the syncRequire but the question is: does it slow down the whole process? And, do you think that the issue will be resolved later on by ExtJS team or not? I've seen the bug is "closed" right now since late 2012.

    Thank you,
  4. #4
    does it slow down the whole process?
    Well, it synchronously loads the scripts. It means that in this code snippet the "After syncRequire" alert box is going to appear only after loading the scripts requested by syncRequire.

    Ext.syncRequire('Test.Debug', function () {
        alert('syncRequire callback');
        Test.Debug.hello();
    });
    
    alert("After syncRequire");
    And, do you think that the issue will be resolved later on by ExtJS team or not?
    Well... I don't quite have any idea, to be honest. Later I should be able to test it in ExtJS 6.

    I've seen the bug is "closed" right now since late 2012.
    Could you, please, post a link?
  5. #5
    Please try to add this override into the page's <head>.
    <script>
        // Overridden because of #924
        Ext.Boot.Entry.prototype.createLoadElement = function (callback) {
            var me = this,
                el = me.getElement(),
                readyStateChange = function () {
                    if (this.readyState === 'loaded' || this.readyState === 'complete') {
                        if (callback) {
                            Ext.defer(callback);
                        }
                    }
                },
                errorFn = function () {
                    me.error = true;
                    if (callback) {
                        callback();
                    }
                };
    
            me.preserve = true;
            el.onerror = errorFn;
    
            if (Ext.Boot.hasReadyState && !Ext.isIE10) { // #924: added "&& !Ext.isIE10"
                el.onreadystatechange = readyStateChange;
            } else {
                el.onload = callback;
                Ext.getBody().appendChild(el); // #924: added the entire line
            }
    
            el[me.prop] = me.getLoadUrl();
        }
    </script>
  6. #6
    Thank you Daniil, we'll try and let you know.
    Regarding the bug closure, if you look at hte link you provided, you see that:
    "unscriptable closed this on 24 Sep 2012"

    Well, it may be understood also, considering that IE is moving toward Edge, ... but we (and not only us) have A LOT of customers that still run IE9/10 for internal policies... and they will never upgrade in the short term ...

    :-(

    Thank you again!
  7. #7
    Regarding the bug closure, if you look at hte link you provided, you see that:
    "unscriptable closed this on 24 Sep 2012"
    Well, just to clarify - that is a GitHub issue of another project. The project is not related to Ext.NET or ExtJS, but they experienced the same issue. Most likely, this issue have never appeared in the ExtJS team scope and it is why it has not fixed.

    Hope my override fixes the problem.
  8. #8
    Hi Daniil, yes you're right it's not ExtJS Forum :-)
    Do you know whether ExtJS team know about this issue? It appears that on the forums it's not found:
    https://www.sencha.com/forum/misc.ph...ire&forums=130

    Thank you again, will let you know whether the fix works or not.
  9. #9
    Do you know whether ExtJS team know about this issue? It appears that on the forums it's not found:
    https://www.sencha.com/forum/misc.ph...ire&forums=130
    Yeah, I've also searched and have not found anything. I think they could be not aware of the issue.
  10. #10
    Hi Daniil, we tried the workaround you proposed, but it looks like not working correctly on IE10 at this line:

                Ext.getBody().appendChild(el); // #924: added the entire line
    The error is: "document.body does not yet exist"

    We'll stick with forcing the IE compatibility to IE9.

    Thank you
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: Jun 02, 2014, 2:15 PM
  2. Replies: 6
    Last Post: May 31, 2013, 3:04 AM
  3. Replies: 5
    Last Post: May 02, 2012, 5:37 PM
  4. Unable to force Roweditor's "AfterEdit" to fire
    By dwijnker in forum 1.x Help
    Replies: 2
    Last Post: Feb 01, 2012, 6:50 PM
  5. Replies: 4
    Last Post: Oct 11, 2011, 2:42 AM

Posting Permissions