Gumby2 Backbone IE8 Web App Fixes

Sam Deering
Tweet

In this post i’ll list any fixes which may help you if your using Gumby2 framework with Backbone. I’ll add more as I find them…

Override a button click in IE8

 
if (Gumby.isOldie) {
    var referLink = document.createElement('a');
    referLink.className = "skiplink";
    referLink.href = "#entry";
    document.body.appendChild(referLink);
    referLink.click();
}
else
{
    window.location.href = "#entry";
}

Hard page refresh for IE8

 
//hard refresh for IE8
if (Gumby.isOldie && document.referrer == "")
{
    window.location = '/#register';
}

In your backbone router:

 
Backbone.history.start({ pushState: Modernizr.history, silent: true });
if(!Modernizr.history) {
    var rootLength = Backbone.history.options.root.length;
    var fragment = window.location.pathname.substr(rootLength);
    Backbone.history.navigate(fragment, { trigger: true });
} else {
    Backbone.history.loadUrl(Backbone.history.getFragment())
}

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

No Reader comments