FIX: Incorrect logo showing up on home page after focus

This commit is contained in:
Robin Ward 2015-06-02 12:36:23 -04:00
parent f28719fd85
commit f3ff435a62
1 changed files with 5 additions and 9 deletions

View File

@ -78,7 +78,7 @@ const TopicView = Discourse.View.extend(AddCategoryClass, AddArchetypeClass, Dis
}.on('willDestroyElement'),
gotFocus: function(){
gotFocus: function() {
if (Discourse.get('hasFocus')){
this.scrolled();
}
@ -91,14 +91,10 @@ const TopicView = Discourse.View.extend(AddCategoryClass, AddArchetypeClass, Dis
offset: 0,
hasScrolled: Em.computed.gt("offset", 0),
/**
The user has scrolled the window, or it is finished rendering and ready for processing.
// The user has scrolled the window, or it is finished rendering and ready for processing.
scrolled() {
@method scrolled
**/
scrolled: function(){
if(this.isDestroyed || this.isDestroying) {
if (this.isDestroyed || this.isDestroying || this._state !== 'inDOM') {
return;
}
@ -172,7 +168,7 @@ function highlight(postNumber) {
$contents.data("orig-color", origColor)
.addClass('highlighted')
.stop()
.animate({ backgroundColor: origColor }, 2500, 'swing', function(){
.animate({ backgroundColor: origColor }, 2500, 'swing', function() {
$contents.removeClass('highlighted');
$contents.css({'background-color': ''});
});