PDA

View Full Version : Ext.History.getToken() returns the String 'null' in Gecko browsers



devtig
14 Mar 2011, 2:25 AM
In Firefox using Ext 3.3.2 with a current url without a # in it, Ext.History.getToken() returns a string with 'null'. That didn't happen in 3.3.1 where an Ext.History.getToken() returned returned null (object).

This change in pkg-history-debug.js is probably causing it:
Ext 3.3.1:


function getHash() {
var href = location.href, i = href.indexOf("#");
return i >= 0 ? href.substr(i + 1) : null;
}


Ext 3.3.2:


function getHash() {
var href = location.href, i = href.indexOf("#"),
hash = i >= 0 ? href.substr(i + 1) : null;

if (Ext.isGecko) {
hash = decodeURIComponent(hash);
}
return hash;
}

divyashah
18 Mar 2013, 9:23 PM
Hi,

Ext.History.getToken() returns null if the url separator is '?'. Can someone reply how to resolve this?

divyashah
18 Mar 2013, 10:46 PM
Hi devtig (http://www.sencha.com/forum/member.php?107236-devtig),

Did you find any solution to your problem?