8

When I write regular code snippets the preview shows a scrollbar when the number of lines > 36 it previews that there will be a scrollbar, while in fact, the scrollbar appears only after the number of lines > 37 in the actual post.

Am I the only one around here that experience this or if not can this be fixed for perfection?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19                           Edit to see what I'm talking about.
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
5
  • [support][feature-request][bug] - so which one is it?
    – Cerbrus
    Commented Feb 14, 2018 at 12:57
  • @Cerbrus I wasn't sure if it was applicable for support, but I believe it is at least both feature request and a bug. As I need support with a bug which may end up being a feature-request. Edit as you like though.
    – Nae
    Commented Feb 14, 2018 at 12:59
  • 1
    A bug report that's being handled is a bug fix. It's not a new feature ;-) I managed to reproduce the inconsistency.
    – Cerbrus
    Commented Feb 14, 2018 at 13:02
  • 2
    (& @Cerbrus) More information: The number of lines required for the scrollbar to appear is different across various browsers. When viewing this page (i.e. not when editing) the scrollbar does not appear in Chrome and Opera. The scrollbar does appear in the question and answer in: Firefox (58 and 52ESR), Edge, IE, and Pale Moon. Given that it shows the scrollbar in the preview at >36 lines in Chrome, the real issue appears to be that in Chrome/Opera 37 lines are visible in the code block (both while editing and in the main display, with the scrollbar not shown in that case when not editing).
    – Makyen Mod
    Commented Feb 14, 2018 at 20:10
  • 1
    The display of the code block should be consistent (at least to: # lines shown/# lines w/o need for vertical scrollbar/# characters shown per line/# characters shown per line w/o need for horizontal scrollbar) across all supported browsers and should be consistent between the edit preview and viewing the question/answer. This information is relied upon while editing to format the code so that it displays without the need for scrollbars.
    – Makyen Mod
    Commented Feb 14, 2018 at 20:14

2 Answers 2

3

Reproduced.

The edit view shows a scrollbar here:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

(Chrome 63.0.3239.132 on Windows 10)

2
2

Looks like the issue was resolved as far as Chrome Version 65.0.3325.146 (Official Build) (64-bit) is concerned. It previews correctly now, but the line number after which the scrollbar appears seems to have been reduced to 36. While in Firefox 58.0.2 (64-bit) it seems that the magic number is 35.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19                           Edit to see what I'm talking about.
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .