XF 1.3 Thread "Reply" button scroll to bottom issue

Status
Not open for further replies.

moleculo

Member
As we all know, when you hit "reply" to quote a post in a thread, XF automatically scrolls to the bottom of the page so the user can just start typing. With some theme designs (Audentio's UI.X, for example), the bottom footer is quite a bit taller than the default because we've put useful things down there. This causes problems when users hit "reply", though - the scroll causes the reply box to be nearly off of the top of the page. Is there a way to adjust how far from the bottom the auto scroll goes?
 
As we all know, when you hit "reply" to quote a post in a thread, XF automatically scrolls to the bottom of the page so the user can just start typing. With some theme designs (Audentio's UI.X, for example), the bottom footer is quite a bit taller than the default because we've put useful things down there. This causes problems when users hit "reply", though - the scroll causes the reply box to be nearly off of the top of the page. Is there a way to adjust how far from the bottom the auto scroll goes?


Did you ever find a solution to this? Even a pointer in the right direction maybe could help me find my way?
 
I actually found a fix, for anyone else looking for this answer.

Not ideal as it involved editing a core .js file, but for me thats fine. I added offset to the scrollAndFocus function in js/xenforo/discussion.js

Change this:
Code:
this.scrollAndFocus=function(){c(i).scrollTop(a.offset().top )
to:
Code:
this.scrollAndFocus=function(){c(i).scrollTop(a.offset().top - 50)

Obviously using the amount of offset you need which in my case was 50px
 
Last edited:
I actually found a fix, for anyone else looking for this answer.

Not ideal as it involved editing a core .js file, but for me thats fine. I added offset to the scrollAndFocus function in js/xenforo/discussion.js

Change this:
Code:
this.scrollAndFocus=function(){c(i).scrollTop(a.offset().top )
to:
Code:
this.scrollAndFocus=function(){c(i).scrollTop(a.offset().top - 50)

Obviously using the amount of offset you need which in my case was 50px

I have the same issue on my site. Your fix sounds like something that Audiento should incorporate into their UI.X as a global setting that can be passed as a variable to this line of javascript.
 
Status
Not open for further replies.
Back
Top Bottom