Skip to content

Commit

Permalink
FIX: Incorrect logo showing up on home page after focus
Browse files Browse the repository at this point in the history
  • Loading branch information
eviltrout committed Jun 2, 2015
1 parent f28719f commit f3ff435
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions app/assets/javascripts/discourse/views/topic.js.es6
Expand Up @@ -78,7 +78,7 @@ const TopicView = Discourse.View.extend(AddCategoryClass, AddArchetypeClass, Dis

}.on('willDestroyElement'),

gotFocus: function(){
gotFocus: function() {
if (Discourse.get('hasFocus')){
this.scrolled();
}
Expand All @@ -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;
}

Expand Down Expand Up @@ -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': ''});
});
Expand Down

0 comments on commit f3ff435

Please sign in to comment.