Every time you think you’ve seen it all with SharePoint another weird behavior comes along. A PM in my company expressed that a client’s subsites (that were based on the team site template) were not respecting the navigation setting (the structured navigation tool) to open links in a new window. All the setting does is add a target=“_blank” to the link. Here is what the setting looks like (from Site Settings — Navigation):
From what I can tell, other site templates do not have this issue. In team sites, the following JS function is adding to the div above the global and local navigation, and it causes the target to be ignored:
onclick="return AjaxNavigate$OnClickHook(event, this);"
In the init.js you can see where it’s pointing to, but ultimately I can’t tell what the purpose of this is. All it seems to do is extend the URL to use hashes. Here’s an example of the type of URL it generates when clicking on a document library.
The only guess I have is that this is used maybe for the analytics engine that is tracking items by click for popularity rankings, but I’m not sure that’s exactly why. If it were, I’d imagine it would be used in other site templates as well. [See the update below]
UPDATE: So it turns out this feature is part of the 2013 minimal download strategy enabled by default on team sites. When this feature is disabled the open in new window functionality is restored. To me, this is still a bug because the MDS should still honor the navigation functionality (or at least remove the option when the feature is enabled).