IE7/8 - Twitter Intents + 'tweet' event binding overwrites parent page title if the URL includes a hash


In IE7 and IE8, If the parent page URL includes a fragment identifier, and a function is bound a a callback to the tweet event, the title of the parent page is overwritten with the fragment identifier. (e.g. becomes #foo)

Reproducible in IE7 and IE8 (also works in IE9 if the browser mode is set to IE7/8)


// standard asynchronous widgets.js load
window.twttr = (function (d,s,id) {
    var t, js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return; js=d.createElement(s);;
    js.src="//"; fjs.parentNode.insertBefore(js, fjs);
    return window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } });
}(document, "script", "twitter-wjs"));

twttr.ready(function(twttr){"tweet", function(){
        // nothing needed here to reproduce the issue

Click this first to set a fragment in the URL. Or type one manually.
Tweet via intent

In IE7 and IE8, if you click the links in order, the page title will be set to #mylink.


Thanks for this report, I’ll forward it on to the team.