Hey,
I have a problem with the tabs widget from the newest jquery.UI (Version 1.9.2) when my document has a <base href=""> tag.
With the previous versions (1.8.23) it worked well.
I did a little research and the problem accours in the isLocal() function where the link href is compared with the location.href.
The link href has the base tag followed by the tab's id which should be opened.
The tabs widget loads the base tag as an remote file and adds it to the head of the first tab and ignores the rest of the tabs content.
Please see the attached png as reference with the screen and the firebug logs I did and the code.
I took the standard example, reloaded the unminified tabs file (to do changes there), and added a base tag.
Above the GET all logs are from the function isLocal() where I added the following lines of code:
console.log("hash: " + anchor.hash);
console.log("href: " + anchor.href);
console.log("replaced href: " + anchor.href.replace( rhash, "" ));
console.log("replaced location href: " + location.href.replace( rhash, "" ));
console.log("condition: " + anchor.hash.length > 1 && anchor.href.replace( rhash, "" ) === location.href.replace( rhash, "" ).replace( /\s/g, "%20" ));
I tried to build myself a bug fix for this problem by changing the code of the isLocal() function to the following code:
return anchor.hash.length > 1 && $(anchor.hash).length == 1;
It worked for me well with ID's and remote files to load.
Is it supposed to work like this or is it a bug? - It works with the example as well if you simply add an base tag to the html head.
Thanks and Regards