Results 1 to 3 of 3

Thread: [INFOREQ] Ext.History bug

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1

    Default [INFOREQ] Ext.History bug

    The following code will replicate the bug:


    Code:
    Ext.History.addListener('change', function() {
        console.log('Change Event Fired');
    });
    
    setTimeout(function() {
        console.log('Location1 - Event should fire and does fire');
        Ext.History.add('Location1');
    }, 2000);
    
    setTimeout(function() {
        console.log('Location2 - Event should fire and does fire');
        Ext.History.add('Location2');
    }, 4000);
    setTimeout(function() {
        console.log('Location2 - Event shouldn\'t fire and doesn\'t fire');
        Ext.History.add('Location2');
    }, 6000);
    setTimeout(function() {
        console.log('Location2 - Event should fire but doesn\'t fire');
        Ext.History.add('Location2', false);
    }, 8000);
    setTimeout(function() {
        console.log('Location3 - Event should fire and does fire');
        Ext.History.add('Location3');
    }, 10000);
    setTimeout(function() {
        console.log('Location3 - Event should fire but doesn\'t fire');
        Ext.History.add('Location3', false);
    }, 12000);

    We have examined the code in ext-all-debug.js on lines 47429 and 47548 and it appears that there is no real connection between the preventDup boolean and the 50ms setInterval() polling function.

    You might want to look into that. We have decided not to patch your code ourselves as we do not know if a submitted patch would be accepted by you and we do not want to have to apply patches (and deal with potential conflicts) whenever we upgrade to the latest version of ExtJs.

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661

    Default

    Welcome to the bug forum. I'm not able to follow what you are doing. Can you follow this guideline so we can get this addressed:

    http://www.extjs.com/forum/showthread.php?t=71015

  3. #3

    Default

    Ext version tested:
    • Ext 3.2 rev 6256-157


    Adapter used:
    • ext


    css used:
    • only default ext-all.css




    Browser versions tested against:
    • FF3.6 (firebug 1.5.2 installed)


    Operating System:
    • Windows 7 Pro


    Description:
    • Ext.History.add does not fire the history's change event when the token is the same, EVEN when preventDup is false.


    Test Case:

    Code:
    Ext.History.addListener('change', function() {
        console.log('Change Event Fired');
    });
    
    setTimeout(function() {
        console.log('Location1 - Event should fire and does fire');
        Ext.History.add('Location1');
    }, 2000);
    
    setTimeout(function() {
        console.log('Location2 - Event should fire and does fire');
        Ext.History.add('Location2');
    }, 4000);
    setTimeout(function() {
        console.log('Location2 - Event shouldn\'t fire and doesn\'t fire');
        Ext.History.add('Location2');
    }, 6000);
    setTimeout(function() {
        console.log('Location2 - Event should fire but doesn\'t fire');
        Ext.History.add('Location2', false);
    }, 8000);
    setTimeout(function() {
        console.log('Location3 - Event should fire and does fire');
        Ext.History.add('Location3');
    }, 10000);
    setTimeout(function() {
        console.log('Location3 - Event should fire but doesn\'t fire');
        Ext.History.add('Location3', false);
    }, 12000);
    Steps to reproduce the problem:
    • See test case above.


    The result that was expected:
    • As described in the test case.


    The result that occurs instead:
    • As described in the test case.


    Screenshot or Video:
    • None


    Debugging already done:
    • We have looked at the code but decided not to pursue debugging since we do not want to fork ExtJs.


    Possible fix:
    • We have a temporary fix by creating an interceptor for the Ext.History.add global singleton function thusly:
      Code:
      Ext.History.add = Ext.History.add.createInterceptor(function(token) {
              if(Ext.History.getToken() == token) {
                  Ext.History.fireEvent('change', token);
                  return false;
              }
              return true;
          });

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •