Before I start I want to apologize for the vague description, but this is quite strange. I myself got the bug report that users had to "double click" toolbar links to change the overlay page. Only Internet Explorer 10 was affected by this. I tested this in chrome, firefox and IE < 10 and the overlay was working just fine. I used an up-to-date IE10 to debug this issue.

I started debug this issue using breakpoints. This is what I found out:

After the toolbar and overlay are initialized and switching from an active item to another overlay path. The bug occurs in the overlay.eventhandlerSyncURLFragment method. When debugging the first getPath invocation (in bold)

if (this.getPath(Drupal.settings.basePath + expected) != this.getPath(this.iframeWindow.document.location)) {

The invocation arguments look OK. the link is string /admin/x. So the method converts it to a native link object using: link = $(link.link(link)).get(0);

After which the link.pathname has an extra / pre-pended!!. This causes the the normalizing regex to fail, since it only expects one /.

path = path.replace(new RegExp(Drupal.settings.basePath + '(?:index.php)?'), '');

And the expected path is returned with 2 slashes, thus failing the check in the eventhandlerSyncURLFragment and registering this click as an internal redirect.

I fixed this for my instance by modifying the regular expression to:
path.replace(new RegExp(Drupal.settings.basePath + '+(?:index.php)?'), '');

But that is far from compatible with drupal sites which do have a basePath other than "/".

I know this is verry vague, but again it is just weird. It looks like the native link function does something to wrongly interpret the string but only sometimes?!

Comments

bala_28’s picture

A small hack (though its not clean) fixed this issue.

Added
path = path.replace("//", "/");

before line
path = path.replace(new RegExp(Drupal.settings.basePath + '(?:index.php)?'), '');

kristofferwiklund’s picture

Is this still a problem with latest 7.x?

nitin.k’s picture

Please can you specify the version of D7 !!

Version: 7.22 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.