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'
|
posts = $$ '.quotesYou'
|
||||||
QuoteYou.cb.scroll posts[if type is 'following' then 0 else posts.length - 1]
|
QuoteYou.cb.scroll posts[if type is 'following' then 0 else posts.length - 1]
|
||||||
|
|
||||||
scroll: (post) ->
|
scroll: (root) ->
|
||||||
if Get.postFromRoot(post).isHidden
|
post = $ '.post', root
|
||||||
|
if !post.getBoundingClientRect().height
|
||||||
return false
|
return false
|
||||||
else
|
else
|
||||||
QuoteYou.lastRead = post
|
QuoteYou.lastRead = root
|
||||||
window.location = "##{post.id}"
|
window.location = "##{post.id}"
|
||||||
Header.scrollTo post
|
Header.scrollTo post
|
||||||
$.addClass $('.post', post), 'highlight'
|
$.addClass post, 'highlight'
|
||||||
return true
|
return true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user