Preventing incorrectly shown unload alert
Preventing incorrectly shown unload alert

issue #1327

- IE9 fires an unload when using Backbone.history.navigate which meant the alert always got shown on first save when the url changes from from /editor/ to /editor/id. Not sure if other browsers do this, but this workaround fixes it

TryGhost/Ghost,ITJesse/Ghost-zh,Trendy/Ghost,STANAPO/Ghost,lowkeyfred/Ghost,edurangel/Ghost,VillainyStudios/Ghost,GarrethDottin/Habits-Design,BlueHatbRit/Ghost,djensen47/Ghost,acburdine/Ghost,makapen/Ghost,alanmoo/moo-on-the-web,makapen/Ghost,handcode7/Ghost,sergeylukin/Ghost,jaguerra/Ghost,dgem/Ghost,panezhang/Ghost,bosung90/Ghost,choskim/GhostAzure,Dnlyc/Ghost,julianromera/Ghost,ManRueda/Ghost,ghostchina/website,woodyrew/Ghost,dYale/blog,ckousik/Ghost,syaiful6/Ghost,edurangel/Ghost,zhiyishou/Ghost,cncodog/Ghost-zh-codog,edsadr/Ghost,thehogfather/Ghost,sceltoas/Ghost,claudiordgz/Ghost,katiefenn/Ghost,cgiffard/Ghost,davidenq/Ghost-Blog,jgladch/taskworksource,bigertech/Ghost,davidmenger/nodejsfan,ballPointPenguin/Ghost,daihuaye/Ghost,jparyani/GhostSS,dai-shi/Ghost,memezilla/Ghost,Alxandr/Blog,hawkrives/Wraith,augbog/Ghost,Romdeau/Ghost,mtvillwock/Ghost,lf2941270/Ghost,TryGhost/Ghost,IbrahimAmin/Ghost,flomotlik/Ghost,rameshponnada/Ghost,BayPhillips/Ghost,tmp-reg/Ghost,smedrano/Ghost,choskim/Ghost,medialab/Ghost,Xibao-Lv/Ghost,Dnlyc/Ghost,jomofrodo/ccb-ghost,imjerrybao/Ghost,xiongjungit/Ghost,JohnONolan/Ghost,tksander/Ghost,katrotz/blog.katrotz.space,smaty1/Ghost,AileenCGN/Ghost,daimaqiao/Ghost-Bridge,vainglori0us/urban-fortnight,pathayes/FoodBlog,codeincarnate/Ghost,Kikobeats/Ghost,kevinansfield/Ghost,wallmarkets/Ghost,jamesyothers/Ghost,MadeOnMars/Ghost,ngosinafrica/SiteForNGOs,dqj/Ghost,lukw00/Ghost,no1lov3sme/Ghost,jparyani/GhostSS,sebgie/Ghost,PaulBGD/Ghost-Plus,netputer/Ghost,javimolla/Ghost,jamesslock/Ghost,melissaroman/ghost-blog,dymx101/Ghost,Remchi/Ghost,nneko/Ghost,NikolaiIvanov/Ghost,vainglori0us/urban-fortnight,e10/Ghost,cncodog/Ghost-zh-codog,Netazoic/bad-gateway,kaychaks/kaushikc.org,schematical/Ghost,netputer/Ghost,lanffy/Ghost,ygbhf/Ghost,chris-yoon90/Ghost,Elektro1776/javaPress,pbevin/Ghost,jacostag/Ghost,diogogmt/Ghost,hyokosdeveloper/Ghost,cysys/ghost-openshift,rchrd2/Ghost,greenboxindonesia/Ghost,jamesyothers/Ghost,halfdan/Ghost,kolorahl/Ghost,laispace/laiblog,ManRueda/manrueda-blog,bitjson/Ghost,jiangjian-zh/Ghost,velimir0xff/Ghost,telco2011/Ghost,dggr/Ghost-sr,davegw/dgw-website,NamedGod/Ghost,allanjsx/Ghost,manishchhabra/Ghost,davidenq/Ghost-Blog,Klaudit/Ghost,mayconxhh/Ghost,tchapi/igneet-blog,andrewconnell/Ghost,vloom/blog,lukekhamilton/Ghost,load11/ghost,memezilla/Ghost,r1N0Xmk2/Ghost,cqricky/Ghost,mlabieniec/ghost-env,novaugust/Ghost,ladislas/ghost,Sebastian1011/Ghost,GroupxDev/javaPress,Rovak/Ghost,jgillich/Ghost,ryanbrunner/crafters,lethalbrains/Ghost,leninhasda/Ghost,ghostchina/Ghost-zh,javorszky/Ghost,darvelo/Ghost,telco2011/Ghost,sajmoon/Ghost,Trendy/Ghost,mlabieniec/ghost-env,jiachenning/Ghost,GarrethDottin/Habits-Design,ericbenson/GhostAzureSetup,jeonghwan-kim/Ghost,r14r/fork_nodejs_ghost,ckousik/Ghost,Coding-House/Ghost,NovaDevelopGroup/Academy,flpms/ghost-ad,UnbounDev/Ghost,omaracrystal/Ghost,sfpgmr/Ghost,delgermurun/Ghost,ManRueda/Ghost,liftup/ghost,andrewconnell/Ghost,mohanambati/Ghost,wemakeweb/Ghost,Gargol/Ghost,rafaelstz/Ghost,zackslash/Ghost,ivanoats/ivanstorck.com,ignasbernotas/nullifer,francisco-filho/Ghost,ballPointPenguin/Ghost,r1N0Xmk2/Ghost,tandrewnichols/ghost,veyo-care/Ghost,freele/ghost,AlexKVal/Ghost,olsio/Ghost,disordinary/Ghost,sfpgmr/Ghost,allanjsx/Ghost,panezhang/Ghost,Bunk/Ghost,etanxing/Ghost,tanbo800/Ghost,consoleblog/consoleblog,rameshponnada/Ghost,zuphu/GhostBlog,jomahoney/Ghost,klinker-apps/ghost,ryanbrunner/crafters,ignasbernotas/nullifer,Aaron1992/Ghost,davidmenger/nodejsfan,llv22/Ghost,atandon/Ghost,developer-prosenjit/Ghost,Azzurrio/Ghost,velimir0xff/Ghost,vlmhco/personal-blog,gcamana/Ghost,bbmepic/Ghost,zumobi/Ghost,tanbo800/Ghost,yangli1990/Ghost,SkynetInc/steam,rollokb/Ghost,kevinansfield/Ghost,alexandrachifor/Ghost,camilodelvasto/herokughost,icowan/Ghost,dylanchernick/ghostblog,mayconxhh/Ghost,alecho/Ghost,Kaenn/Ghost,Feitianyuan/Ghost,sankumsek/Ghost-ashram,ClarkGH/Ghost,cicorias/Ghost,yanntech/Ghost,sceltoas/Ghost,bbmepic/Ghost,ljhsai/Ghost,mattchupp/blog,arvidsvensson/Ghost,kaiqigong/Ghost,mttschltz/ghostblog,load11/ghost,beautyOfProgram/Ghost,NodeJSBarenko/Ghost,ryansukale/ux.ryansukale.com,benstoltz/Ghost,Polyrhythm/dolce,jomofrodo/ccb-ghost,ddeveloperr/Ghost,PepijnSenders/whatsontheotherside,r14r/fork_nodejs_ghost,bastianbin/Ghost,KnowLoading/Ghost,ManRueda/manrueda-blog,ThorstenHans/Ghost,tmp-reg/Ghost,AlexKVal/Ghost,mattvh/Ghost,wangjun/Ghost,riyadhalnur/Ghost,wemakeweb/Ghost,janvt/Ghost,diancloud/Ghost,kortemy/Ghost,notno/Ghost,influitive/crafters,gabfssilva/Ghost,hnq90/Ghost,rtorino/me-etc,vloom/blog,adam-paterson/blog,sifatsultan/js-ghost,uploadcare/uploadcare-ghost-demo,disordinary/Ghost,jorgegilmoreira/ghost,rizkyario/Ghost,qdk0901/Ghost,denzelwamburu/denzel.xyz,flomotlik/Ghost,patterncoder/patterncoder,julianromera/Ghost,zeropaper/Ghost,exsodus3249/Ghost,AnthonyCorrado/Ghost,YY030913/Ghost,tadityar/Ghost,bsansouci/Ghost,halfdan/Ghost,zumobi/Ghost,praveenscience/Ghost,pathayes/FoodBlog,ericbenson/GhostAzureSetup,Klaudit/Ghost,cwonrails/Ghost,ErisDS/Ghost,epicmiller/pages,epicmiller/pages,duyetdev/islab,cicorias/Ghost,fredeerock/atlabghost,delgermurun/Ghost,Jonekee/Ghost,maverickcoders/blog,wangjun/Ghost,JohnONolan/Ghost,leonli/ghost,davegw/dgw-website,lukaszklis/Ghost,mnitchie/Ghost,mnitchie/Ghost,hnq90/Ghost,etanxing/Ghost,PeterCxy/Ghost,klinker-apps/ghost,virtuallyearthed/Ghost,RufusMbugua/TheoryOfACoder,bisoe/Ghost,Alxandr/Blog,lf2941270/Ghost,lethalbrains/Ghost,jiangjian-zh/Ghost,anijap/PhotoGhost,NovaDevelopGroup/Academy,UsmanJ/Ghost,ASwitlyk/Ghost,wspandihai/Ghost,NamedGod/Ghost,skmezanul/Ghost,mtvillwock/Ghost,DesenTao/Ghost,Kaenn/Ghost,cysys/ghost-openshift,gleneivey/Ghost,k2byew/Ghost,neynah/GhostSS,thomasalrin/Ghost,jeonghwan-kim/Ghost,qdk0901/Ghost,PDXIII/Ghost-FormMailer,ashishapy/ghostpy,diancloud/Ghost,rouanw/Ghost,allanjsx/Ghost,no1lov3sme/Ghost,bsansouci/Ghost,gcamana/Ghost,medialab/Ghost,akveo/akveo-blog,cysys/ghost-openshift,francisco-filho/Ghost,JonSmith/Ghost,hyokosdeveloper/Ghost,dqj/Ghost,Feitianyuan/Ghost,jacostag/Ghost,NikolaiIvanov/Ghost,letsjustfixit/Ghost,JohnONolan/Ghost,UsmanJ/Ghost,smedrano/Ghost,camilodelvasto/localghost,sajmoon/Ghost,ITJesse/Ghost-zh,sifatsultan/js-ghost,beautyOfProgram/Ghost,weareleka/blog,claudiordgz/Ghost,BayPhillips/Ghost,fredeerock/atlabghost,Sebastian1011/Ghost,hoxoa/Ghost,Kikobeats/Ghost,mattvh/Ghost,nneko/Ghost,FredericBernardo/Ghost,10hacks/blog,karmakaze/Ghost,developer-prosenjit/Ghost,PaulBGD/Ghost-Plus,stridespace/Ghost,sebgie/Ghost,Elektro1776/javaPress,pollbox/ghostblog,floofydoug/Ghost,codeincarnate/Ghost,Brunation11/Ghost,lukaszklis/Ghost,camilodelvasto/herokughost,dbalders/Ghost,hilerchyn/Ghost,darvelo/Ghost,etdev/blog,veyo-care/Ghost,dggr/Ghost-sr,pedroha/Ghost,AnthonyCorrado/Ghost,e10/Ghost,mhhf/ghost-latex,jparyani/GhostSS,edsadr/Ghost,kwangkim/Ghost,DesenTao/Ghost,rmoorman/Ghost,KnowLoading/Ghost,jaswilli/Ghost,shannonshsu/Ghost,obsoleted/Ghost,k2byew/Ghost,zeropaper/Ghost,prosenjit-itobuz/Ghost,floofydoug/Ghost,ryansukale/ux.ryansukale.com,dgem/Ghost,daimaqiao/Ghost-Bridge,scopevale/wethepeopleweb.org,tadityar/Ghost,chevex/undoctrinate,diogogmt/Ghost,aschmoe/jesse-ghost-app,adam-paterson/blog,LeandroNascimento/Ghost,ghostchina/Ghost-zh,gleneivey/Ghost,mdbw/ghost,JonathanZWhite/Ghost,aroneiermann/GhostJade,tuan/Ghost,kwangkim/Ghost,lukw00/Ghost,llv22/Ghost,Azzurrio/Ghost,dggr/Ghost-sr,sergeylukin/Ghost,stridespace/Ghost,devleague/uber-hackathon,shrimpy/Ghost,thinq4yourself/Unmistakable-Blog,PDXIII/Ghost-FormMailer,krahman/Ghost,Netazoic/bad-gateway,Yarov/yarov,rizkyario/Ghost,xiongjungit/Ghost,carlosmtx/Ghost,mohanambati/Ghost,Loyalsoldier/Ghost,davidblurton/salmondesign-old,javorszky/Ghost,patterncoder/patterncoder,NovaDevelopGroup/Academy,patrickdbakke/ghost-spa,kortemy/Ghost,sangcu/Ghost,YY030913/Ghost,exsodus3249/Ghost,Remchi/Ghost,kmeurer/GhostAzureSetup,kortemy/Ghost,metadevfoundation/Ghost,Japh/Ghost,dymx101/Ghost,devleague/uber-hackathon,acburdine/Ghost,novaugust/Ghost,v3rt1go/Ghost,novaugust/Ghost,yangli1990/Ghost,melissaroman/ghost-blog,Bunk/Ghost,wallmarkets/Ghost,greyhwndz/Ghost,Rovak/Ghost,anijap/PhotoGhost,Kikobeats/Ghost,yanntech/Ghost,JulienBrks/Ghost,TryGhost/Ghost,phillipalexander/Ghost,yundt/seisenpenji,Sing-Li/GhostSS,ananthhh/Ghost,ryanorsinger/tryghost,devleague/uber-hackathon,kevinansfield/Ghost,jiachenning/Ghost,kmeurer/Ghost,shannonshsu/Ghost,weareleka/blog,jin/Ghost,oimou-house/blog,Jai-Chaudhary/Ghost,arvidsvensson/Ghost,jorgegilmoreira/ghost,TribeMedia/Ghost,pensierinmusica/Ghost,omaracrystal/Ghost,morficus/Ghost,dbalders/Ghost,cobbspur/Ghost,petersucks/blog,olsio/Ghost,tyrikio/Ghost,ladislas/ghost,camilodelvasto/localghost,jgillich/Ghost,rizkyario/Ghost,bosung90/Ghost,Netazoic/bad-gateway,UnbounDev/Ghost,schematical/Ghost,vishnuharidas/Ghost,VillainyStudios/Ghost,nakamuraapp/new-ghost,kolorahl/Ghost,Japh/shortcoffee,aroneiermann/GhostJade,tidyui/Ghost,johngeorgewright/blog.j-g-w.info,rwjblue/Ghost,situkangsayur/Ghost,ASwitlyk/Ghost,carlyledavis/Ghost,influitive/crafters,ManRueda/manrueda-blog,Shauky/Ghost,lanffy/Ghost,mlabieniec/ghost-env,RoopaS/demo-intern,nmukh/Ghost,rito/Ghost,imjerrybao/Ghost,Brunation11/Ghost,axross/ghost,Jonekee/Ghost,hoxoa/Ghost,manishchhabra/Ghost,prosenjit-itobuz/Ghost,laispace/laiblog,Xibao-Lv/Ghost,MrMaksimize/sdg1,ThorstenHans/Ghost,zhiyishou/Ghost,yujingz/yujignz.com,greyhwndz/Ghost,hnarayanan/narayanan.co,wspandihai/Ghost,rollokb/Ghost,neynah/GhostSS,nmukh/Ghost,ljhsai/Ghost,jomahoney/Ghost,MadeOnMars/Ghost,cqricky/Ghost,allspiritseve/mindlikewater,tksander/Ghost,Smile42RU/Ghost,johngeorgewright/blog.j-g-w.info,flpms/ghost-ad,uniqname/everydaydelicious,Yarov/yarov,v3rt1go/Ghost,letsjustfixit/Ghost,skleung/blog,icowan/Ghost,pensierinmusica/Ghost,alecho/Ghost,jaswilli/Ghost,katrotz/blog.katrotz.space,ygbhf/Ghost,singular78/Ghost,djensen47/Ghost,pbevin/Ghost,InnoD-WebTier/hardboiled_ghost,mikecastro26/ghost-custom,mdbw/ghost,atandon/Ghost,axross/ghost,skleung/blog,woodyrew/Ghost,RufusMbugua/TheoryOfACoder,metadevfoundation/Ghost,Alxandr/Blog,laispace/laiblog,choskim/ghost_exp,liftup/ghost,ngosinafrica/SiteForNGOs,maverickcoders/blog,ivantedja/ghost,carlyledavis/Ghost,bisoe/Ghost,javimolla/Ghost,ananthhh/Ghost,leonli/ghost,bastianbin/Ghost,trepafi/ghost-base,karmakaze/Ghost,cwonrails/Ghost,sebgie/Ghost,singular78/Ghost,bitjson/Ghost,Loyalsoldier/Ghost,allspiritseve/mindlikewater,acburdine/Ghost,Gargol/Ghost,kaychaks/kaushikc.org,SachaG/bjjbot-blog,thomasalrin/Ghost,gabfssilva/Ghost,kaiqigong/Ghost,optikalefx/Ghost,davidenq/Ghost-Blog,10hacks/blog,ineitzke/Ghost,SkynetInc/steam,ghostchina/Ghost.zh,pollbox/ghostblog,dai-shi/Ghost,GroupxDev/javaPress,obsoleted/Ghost,hnarayanan/narayanan.co,blankmaker/Ghost,sunh3/Ghost,lukekhamilton/Ghost,barbastan/Ghost,aexmachina/blog-old,FredericBernardo/Ghost,leonli/ghost,dbalders/Ghost,denzelwamburu/denzel.xyz,BlueHatbRit/Ghost,leninhasda/Ghost,zackslash/Ghost,lcamacho/Ghost,InnoD-WebTier/hardboiled_ghost,rchrd2/Ghost,rito/Ghost,Jai-Chaudhary/Ghost,johnnymitch/Ghost,mttschltz/ghostblog,aschmoe/jesse-ghost-app,riyadhalnur/Ghost,ddeveloperr/Ghost,theonlypat/Ghost,JulienBrks/Ghost,JonathanZWhite/Ghost,davidblurton/salmondesign-old,letsjustfixit/Ghost,sunh3/Ghost,notno/Ghost,rouanw/Ghost,lowkeyfred/Ghost,ErisDS/Ghost,augbog/Ghost,Elektro1776/javaPress,barbastan/Ghost,mohanambati/Ghost,greenboxindonesia/Ghost,psychobunny/Ghost,sangcu/Ghost,Kaenn/Ghost,Netazoic/bad-gateway,situkangsayur/Ghost,InnoD-WebTier/hardboiled_ghost,mhhf/ghost-latex,ManRueda/Ghost,achimos/ghost_as,Smile42RU/Ghost,jorgegilmoreira/ghost,Japh/Ghost,choskim/Ghost,kmeurer/Ghost,akveo/akveo-blog,ashishapy/ghostpy,neynah/GhostSS,janvt/Ghost,mattchupp/blog,thinq4yourself/Unmistakable-Blog,jin/Ghost,stridespace/Ghost,hawkrives/Wraith,Romdeau/Ghost,ivanoats/ivanstorck.com,rmoorman/Ghost,uploadcare/uploadcare-ghost-demo,carlosmtx/Ghost,thehogfather/Ghost,duyetdev/islab,dylanchernick/ghostblog,johnnymitch/Ghost,dYale/blog,madole/diverse-learners,yujingz/yujignz.com,blankmaker/Ghost,etdev/blog,tyrikio/Ghost,rafaelstz/Ghost,jaguerra/Ghost,Japh/shortcoffee,eduardojmatos/eduardomatos.me,TribeMedia/Ghost,syaiful6/Ghost,cwonrails/Ghost,schneidmaster/theventriloquist.us,optikalefx/Ghost,jamesslock/Ghost,ErisDS/Ghost,daihuaye/Ghost,petersucks/blog,tandrewnichols/ghost,tidyui/Ghost,Empeeric/justanidea,schneidmaster/theventriloquist.us,vainglori0us/urban-fortnight,ghostchina/Ghost.zh,morficus/Ghost,yundt/seisenpenji,IbrahimAmin/Ghost,cncodog/Ghost-zh-codog,phillipalexander/Ghost,madole/diverse-learners,praveenscience/Ghost,choskim/GhostAzure,pedroha/Ghost,virtuallyearthed/Ghost,LeandroNascimento/Ghost,avh4/blog.avh4.net,achimos/ghost_as,Coding-House/Ghost,skmezanul/Ghost,trunk-studio/Ghost,benstoltz/Ghost,ineitzke/Ghost,PepijnSenders/whatsontheotherside,telco2011/Ghost,PeterCxy/Ghost,STANAPO/Ghost,handcode7/Ghost,GroupxDev/javaPress,hilerchyn/Ghost,shrimpy/Ghost,jomofrodo/ccb-ghost,maverickcoders/blog,chris-yoon90/Ghost,JonSmith/Ghost,SachaG/bjjbot-blog,singular78/Ghost,psychobunny/Ghost,trunk-studio/Ghost,smaty1/Ghost,ClarkGH/Ghost,theonlypat/Ghost,daimaqiao/Ghost-Bridge