Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    History bug? Callback not being called when there is a history state

    Hi,

    I am using SmartClient 8.0 GPL edition and testing this code with FF 4.0.1 / Mac Os Snow Leopard.

    The issue is that when user access my page with a history state ( eg.: #index1 in url ), them access other page which creates a history entry and press back button, the callback function is not called.

    Sample code:

    Code:
    isc.History.registerCallback('historyCallback(id)');
    
    isc.Page.setEvent('load', 'restoreHistory()');
    
    function historyCallback(id) {
    	console.log('Callback: '+ id);
    }
    
    function restoreHistory() {
    	console.log('Restore History: '+ isc.History.getCurrentHistoryId());
    }
    To reproduce, enter on page with #index1, run isc.History.addHistoryEntry('index2'); and click on back button. You will notice that the url changes on the address bar, but callback is not called.

    Is this the expected behavior? Or is it a bug in SC?

    #2
    Anyone also having this problem?

    Just to confirm if this is an issue with SmartClient or maybe i am doing something wrong with my code :)

    Comment

    Working...
    X