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

View File

@ -78,7 +78,7 @@ const TopicView = Discourse.View.extend(AddCategoryClass, AddArchetypeClass, Dis
}.on('willDestroyElement'), }.on('willDestroyElement'),
gotFocus: function(){ gotFocus: function() {
if (Discourse.get('hasFocus')){ if (Discourse.get('hasFocus')){
this.scrolled(); this.scrolled();
} }
@ -91,14 +91,10 @@ const TopicView = Discourse.View.extend(AddCategoryClass, AddArchetypeClass, Dis
offset: 0, offset: 0,
hasScrolled: Em.computed.gt("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 if (this.isDestroyed || this.isDestroying || this._state !== 'inDOM') {
**/
scrolled: function(){
if(this.isDestroyed || this.isDestroying) {
return; return;
} }
@ -172,7 +168,7 @@ function highlight(postNumber) {
$contents.data("orig-color", origColor) $contents.data("orig-color", origColor)
.addClass('highlighted') .addClass('highlighted')
.stop() .stop()
.animate({ backgroundColor: origColor }, 2500, 'swing', function(){ .animate({ backgroundColor: origColor }, 2500, 'swing', function() {
$contents.removeClass('highlighted'); $contents.removeClass('highlighted');
$contents.css({'background-color': ''}); $contents.css({'background-color': ''});
}); });