Future fix Post preview scrollbar

Affected version
2.0.0 RC 3

Lukas W.

Well-known member


Probably the padding from the very long inline code. Chrome 62.0.3202.94 (Official Build) (64-bit) on Win10, 175% Windows Zoom-Thingy.
 

Mike

XenForo developer
Staff member
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.
 

Mike

XenForo developer
Staff member
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.
 

ShikiSuen

Well-known member
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:

ShikiSuen

Well-known member
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:
Top