mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 07:53:39 +08:00
FIX: Incorrect logo showing up on home page after focus
This commit is contained in:
parent
f28719fd85
commit
f3ff435a62
|
@ -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': ''});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user