FIX: Title could temporarily revert to the site name
This commit is contained in:
parent
ae2f861101
commit
6c65162b05
|
@ -1,16 +1,9 @@
|
|||
/*global Favcount:true*/
|
||||
|
||||
/**
|
||||
The main Discourse Application
|
||||
|
||||
@class Discourse
|
||||
@extends Ember.Application
|
||||
**/
|
||||
var DiscourseResolver = require('discourse/ember/resolver').default;
|
||||
|
||||
window.Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {
|
||||
rootElement: '#main',
|
||||
_docTitle: null,
|
||||
_docTitle: document.title,
|
||||
|
||||
getURL: function(url) {
|
||||
// If it's a non relative URL, return it.
|
||||
|
@ -46,13 +39,7 @@ window.Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {
|
|||
title = "(" + notifyCount + ") " + title;
|
||||
}
|
||||
|
||||
if (title !== document.title) {
|
||||
// chrome bug workaround see: http://stackoverflow.com/questions/2952384/changing-the-window-title-when-focussing-the-window-doesnt-work-in-chrome
|
||||
window.setTimeout(function() {
|
||||
document.title = ".";
|
||||
document.title = title;
|
||||
}, 200);
|
||||
}
|
||||
document.title = title;
|
||||
}.observes('_docTitle', 'hasFocus', 'notifyCount'),
|
||||
|
||||
faviconChanged: function() {
|
||||
|
|
Loading…
Reference in New Issue