1. #11
    Ext JS Premium Member devtig's Avatar
    Join Date
    Jan 2010
    Location
    Rotterdam, The Netherlands
    Posts
    389
    Vote Rating
    13
    devtig will become famous soon enough

      0  

    Question I dont even see a back button with this simple example

    I dont even see a back button with this simple example


    Try and run this in IE7, IE8 Ext JS 3.3.1 through 3.4.0. You won't see a back button after clicking on the button. Why?

    HTML Code:
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Where is IE back button?</title>
        <link rel="stylesheet" type="text/css" href="/extjs/3/3/1/resources/css/ext-all.css"/>
        <script type="text/javascript" src="/extjs/3/3/1/adapter/ext/ext-base.js"></script>
        <script type="text/javascript" src="/extjs/3/3/1/ext-all.js"></script>
        <script type="text/javascript">
        Ext.onReady(function() {
            Ext.History.init();
            
            var panel=new Ext.Panel({
                title: 'Message Title',
                renderTo: Ext.getBody(),
                width: 200, height: 130,
                defaultType: 'box',
                items: {
                    xtype: 'button',
                    text: 'Go to thanks',
                    handler: function() {
                        Ext.History.add('thanks');
                    }
                }
            });
    
            Ext.History.on('change', function(token) {
                panel.add({
                    html: 'history change: '+token
                });
                panel.doLayout();
            });
        });
        </script>
    </head>
    <body>
    <!-- Fields required for history management -->
    <form id="history-form" class="x-hidden">
        <input type="hidden" id="x-history-field" />
        <iframe id="x-history-frame"></iframe>
    </form>
    </body>
    </html>

  2. #12
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,592
    Vote Rating
    323
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    It seems to help if you add a doctype. I tried it with this and it fixed it:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/html4/loose.dtd">

  3. #13
    Sencha User
    Join Date
    Feb 2013
    Posts
    4
    Vote Rating
    0
    wrowan is on a distinguished road

      0  

    Default


    Did anyone find a solution to this?

    We are having a similar problem and can't find any solution.

    I have a pretty thorough write-up here:

    http://stackoverflow.com/questions/15042460/back-button-using-extjs-3-4-history-with-ie8-ie9-standards-document-mode

    The net is that I can't get the Ext History utility to work more than once with the browser back button when running in IE in Standard Document mode for versions 8 and higher. If I traverse from page1 to page2 to page3, then hit the back button twice, I end up on page3, not page1.

    The History example that Sencha has posted exhibits this behavior, however, it is masked because Quirks mode is the page default.

    Any hints or thoughts would be tremendously appreciated.

  4. #14
    Sencha User
    Join Date
    Feb 2013
    Posts
    4
    Vote Rating
    0
    wrowan is on a distinguished road

      0  

    Default


    This was actually pretty straightforward. I downloaded Ext 4.1 and looked at what they were doing with the Ext.util.History class. They define a variable for oldIEMode and use that for all the conditionals where in 3.4 they are using Ext.isIE.
    So I edited the Ext.History class in ext-all-debug.js and defined the following variable at the top:
    var oldIEMode = Ext.isIE6 || Ext.isIE7 || !Ext.isStrict && Ext.isIE8;
    There were three conditionals in the class that were checking for Ext.isIE which I replaced with oldIEMode.

    I ended up overriding the class rather than editing the ext-all.js file. My full solution is posted on the stackoverflow question thread.