Make QuoteYou scrolling use post ID instead of postContainer's.
Also make hiding detection more general.
This commit is contained in:
parent
db46cf64b2
commit
5e31c289b7
@ -52,12 +52,13 @@ QuoteYou =
|
||||
posts = $$ '.quotesYou'
|
||||
QuoteYou.cb.scroll posts[if type is 'following' then 0 else posts.length - 1]
|
||||
|
||||
scroll: (post) ->
|
||||
if Get.postFromRoot(post).isHidden
|
||||
scroll: (root) ->
|
||||
post = $ '.post', root
|
||||
if !post.getBoundingClientRect().height
|
||||
return false
|
||||
else
|
||||
QuoteYou.lastRead = post
|
||||
QuoteYou.lastRead = root
|
||||
window.location = "##{post.id}"
|
||||
Header.scrollTo post
|
||||
$.addClass $('.post', post), 'highlight'
|
||||
$.addClass post, 'highlight'
|
||||
return true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user