Fixed Post preview scrollbar

Lukas W.

Well-known member
Affected version
2.0.0 RC 3
rpRRgsQ.png


Probably the padding from the very long inline code. Chrome 62.0.3202.94 (Official Build) (64-bit) on Win10, 175% Windows Zoom-Thingy.
 
I think you're actually running into a Chrome bug that relates to zoom. There are a number of open bug reports about it in their tracker.

Though I'd need to test.
 
This doesn't appear to be zoom related, but it does appear to be a different Chrome bug. It looks that it's not taking into account box-decoration-break when doing the wrapping.

I'm going to confirm this, but this is really just to put together a reduced test case and report it as a Chrome bug.
 
Wondering if this different approach has been implemented in 2.1? :unsure:
This is what it looks like on XF 2.1.10 PL2 on Microsoft Edge Chromium 83:
(There are overflows, but my system doesn't show up the scroller by default unless you tried scrolling it.)
1590709009984.png
 
Last edited:
Let me assume a workaround for this issue: simply change the content area of the preview content with max-width: 95% or a little bit less.
This can prevent horizontal scrollbar from coming up even if there's a little bit overflow, unless my idea is not robust.

Alternatively, change the inner margin-right or padding-right of the appropriate content level to at least 1.5em as a buffer.

-------------

I tested the following solutions work:
(mentioning @Lukas W. to bring his attention.)

Solution A: .bbCodePreview-content {padding-right: 0.5em;} // if happens again, use 1em in lieu of 0.5 em as a bigger buffer.
Solution B (total solution I'm afraid, though sacrificing the border radius for inline code block):
1590710106537.png

This is how it looks in my style:
1590710841675.png
 
Last edited:
As what Mike addressed above, this issue doesn't happen with XenForo 2.2.x releases (due to its new editor design).

Thus, my fix posted above is only for XenForo 2.0.x and 2.1.x users.

Case closed.
 
Back
Top Bottom