Browser issue Page Down/Up while composing replies jumps to top/bottom

linkhyrule5

New member
When composing a reply of sufficient length in any appropriate box -- conversation reply, reply box at the bottom of the thread, etc -- the page down and page up buttons jump to the bottom or top of the post, respectively, instead of jumping a single "page"/reply box height. This is very annoying when trying to compose long posts section by section, as it makes it difficult to navigate within the post without a scroll wheel.

This bug appears to only affect recent Firefox versions. Chrome, Edge, and latest Waterfox (running Firefox 56 or so) all were unaffected.


I suspect some handler script is trying to get their parent's height and getting the height of the iframe (the entire document) instead of the height of the iframe in the actual parent, but that's just my guess from poking around at fixing it when I thought it was a general Firefox bug.

Note: I'm not an admin, so I don't know the exact versions. However, it seems to affect both XenForo v1 and v2, as I've seen it on two different XenForo forums, as well as this forum itself. It also only started recently (around a month ago), so it's probably fairly recent.

EDIT: Belay that last point; it occurred to me that I in fact switched Firefox versions around then, so that data point is confounded. I have no idea how old this bug is, other than it's probably more recent than Firefox 56.
 
Last edited:
Note: I'm not an admin, so I don't know the exact versions. However, it seems to affect both XenForo v1 and v2, as I've seen it on two different XenForo forums, as well as this forum itself. It also only started recently (around a month ago), so it's probably fairly recent.
XF1.5.20+, XF2.1.3, and this forum which is likely some XF2.1.4 dev version
 
We don’t have any control over the Pg Up/Down key behaviour nor attempt to do anything with that as far as I know.

So whatever you’re seeing is likely just the behaviour of those keys in that browser.

Or am I missing something?
 
We don’t have any control over the Pg Up/Down key behaviour nor attempt to do anything with that as far as I know.

So whatever you’re seeing is likely just the behaviour of those keys in that browser.

Or am I missing something?
I did realize my mockup test left one variable uncontrolled, but yes, even after I fixed that I can still get pageup/pagedown to work differently in a simple dummy box. Example: navigate to the following url (speaking of which, XenForo doesn't seem to support data-url links :V)

data:text/html, <html><body><iframe height='300' src="data:text/html,<html><body><div contenteditable='true' style='height: 280; overflow-y: scroll; '>Your text here</div></body></html>"></iframe></body></html>
If you copy some sufficiently long text where it says "Your text here", you'll see that pageup and pagedown correctly scroll one div-height minus one line. The same test on a XenForo page scrolls to the top or bottom of the entire post. Both are contenteditable divs inside iframes, so whatever remains should be XenForo specific behavior, I think?

EDIT: It seems at some point since v1 XenForo moved away from using iframes. However, the same (correct) behavior continues to occur if you remove the iframe in my mockup. (Code has been minimally changed for readability and ease of use)

data:text/html, <html><body><div contenteditable='true' style='border:2px solid black; width: 300; height: 280; overflow-y: scroll; '>Your text here</div></body></html></html>
 
Last edited:
Top Bottom