none
Scroll Bars Hide Code RRS feed

  • Question

  • When you use the Insert Code Block feature to post code in a reply, a scroll bar is automatically used to prevent word wrapping if any lines are too long for the display. Sometimes, the scroll bar obscures the last line of code. We have had this problem for months. However, it only happens occasionally, and is not experienced by everyone at the same time. I have a thread in the TechNet Sandbox forum I use to check if I am experiencing the behavior (since I no longer use "Insert Code Block" myself).

    I've experienced this problem less recently, but it caused confusion for the op in this thread:

    http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/2ff646e0-1b1a-489a-8562-3f7bd21b7518

    Most of us saw the suggested solution (one line of code), but the op did not. It wasn't until today that we recognized the problem and posted the solution without using "Insert Code Block" so the op could see it.

    I have long had the theory that we get forum code from different cache servers at different times and places. Perhaps Microsoft people never see the problem. I think there is a server out there providing faulting forum code. In the past when I had the problem, I could sometimes fix it by restarting. Otherwise I just had to wait a few days.

    Is there a solution for this? Here is an example, one long line of code that turns on the scroll bar for most people:

    dsquery * -Filter "(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=65536))" -attr distinguishedName sAMAccountName givenName sn displayName

    The op in the thread I linked will not see the code.


    Richard Mueller - MVP Directory Services

    Thursday, August 30, 2012 2:52 PM
    Moderator

Answers

All replies

  • When you use the Insert Code Block feature to post code in a reply, a scroll bar is automatically used to prevent word wrapping if any lines are too long for the display. Sometimes, the scroll bar obscures the last line of code. We have had this problem for months. However, it only happens occasionally, and is not experienced by everyone at the same time. I have a thread in the TechNet Sandbox forum I use to check if I am experiencing the behavior (since I no longer use "Insert Code Block" myself).

    I've experienced this problem less recently, but it caused confusion for the op in this thread:

    http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/2ff646e0-1b1a-489a-8562-3f7bd21b7518

    Most of us saw the suggested solution (one line of code), but the op did not. It wasn't until today that we recognized the problem and posted the solution without using "Insert Code Block" so the op could see it.

    I have long had the theory that we get forum code from different cache servers at different times and places. Perhaps Microsoft people never see the problem. I think there is a server out there providing faulting forum code. In the past when I had the problem, I could sometimes fix it by restarting. Otherwise I just had to wait a few days.

    Is there a solution for this? Here is an example, one long line of code that turns on the scroll bar for most people:

    dsquery * -Filter "(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=65536))" -attr distinguishedName sAMAccountName givenName sn displayName

    The op in the thread I linked will not see the code.


    Richard Mueller - MVP Directory Services

    Neither can I, and this is a problem I experience far too often.


    Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

    Thursday, August 30, 2012 3:21 PM
  • What part of the code is not shown in your example?

    Thanks!


    Ed Price (a.k.a User Ed), SQL Server Experience Program Manager (Blog, Twitter, Wiki)

    Monday, September 3, 2012 8:21 AM
    Owner
  • What part of the code is not shown in your example?

    Isn't this the same issue as mentioned in this thread (screenshots included.)

    ...I've never had this happen to me (with any browser on Windows 7 Ultimate 64 bit)

    Tuesday, September 4, 2012 8:58 AM
  • Is there a solution for this? Here is an example, one long line of code that turns on the scroll bar for most people:

    dsquery * -Filter "(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=65536))" -attr distinguishedName sAMAccountName givenName sn displayName

    It's CSS only.  So in IE you could temporarily turn that off with View, Style, No Style (Alt-V,y,N).

    Alternatively, you could try capturing it even if you couldn't see it by doing a triple click.   Using Caret Browsing (F7) could help too, especially if you just wanted to try reading it, instead of capturing it.

    Do all browsers see the obscuring effect?  Sounds like an issue with Text size, Zoom, DPI setting etc.   That would explain why only some people would see a problem symptom.

    FYI


    Robert
    ---

    Thursday, September 6, 2012 8:53 PM
  • I  knew it was just a matter of time before I would experience this problem again. This thread in the TechNet sandbox is where I check if I have the problem:

    http://social.technet.microsoft.com/Forums/en-US/tnsandbox/thread/cb3f8405-eccc-491b-b445-800e1ad03b5b

    The first reply has one line of code posted using the "Insert Code Block" feature. Usually I see the line. Now I only see the scroll bar. This is what I see now:

    The actual line of code is shown below, inserting using the "Insert HTML" feature (but with my HTML stripped out, another annoying problem).

    If you go to the thread I linked, you may or may not see the same thing. Hence my theory that we get different forum code at different times from different cache servers.


    Richard Mueller - MVP Directory Services

    Wednesday, September 12, 2012 4:06 PM
    Moderator
  • I  knew it was just a matter of time before I would experience this problem again. This thread in the TechNet sandbox is where I check if I have the problem:

    http://social.technet.microsoft.com/Forums/en-US/tnsandbox/thread/cb3f8405-eccc-491b-b445-800e1ad03b5b

    The first reply has one line of code posted using the "Insert Code Block" feature. Usually I see the line. Now I only see the scroll bar. This is what I see now:

    The actual line of code is shown below, inserting using the "Insert HTML" feature (but with my HTML stripped out, another annoying problem).

    If you go to the thread I linked, you may or may not see the same thing. Hence my theory that we get different forum code at different times from different cache servers.


    Richard Mueller - MVP Directory Services

    The strange thing is that I don't see the issue on the linked page. What's the browser? And you cleared cache and cookies? This is strange.

    Thanks!


    Ed Price (a.k.a User Ed), SQL Server Experience Program Manager (Blog, Twitter, Wiki)

    Thursday, September 13, 2012 11:53 PM
    Owner
  • I'm using IE 9 on Windows 7. At present, I see the line of code (the scroll bar does not obscure it). In the past I tried to refresh (F5), restart IE, and even restart my computer to fix this, but nothing seemed to work. How do I clear cache and cookies? Does "Delete browsing history" do that?


    Richard Mueller - MVP Directory Services

    Friday, September 14, 2012 12:05 AM
    Moderator
  • In the past I tried to refresh (F5)

    Try Ctrl-F5, not any other Refresh, since all that they do is cache-checking.   So if the hypothesis is that different servers have broken caches you would want to avoid doing cache-checking and do a real request.   Another way of getting this effect without resorting to a full clearing of the TIF presumably would be to use the Developer Tools, Cache, Clear Browser cache for this domain (F12, Ctrl-d).   Use the Developer Tools Network Capture (F12, Ctrl-Backtab, F5) to be sure that you aren't just getting cache-checking--at least for the pieces that seem to be involved in your symptom.

    Good luck

     

    Robert
    ---

    Friday, September 14, 2012 12:39 AM
  • I'm using IE 9 on Windows 7. At present, I see the line of code (the scroll bar does not obscure it). In the past I tried to refresh (F5), restart IE, and even restart my computer to fix this, but nothing seemed to work. How do I clear cache and cookies? Does "Delete browsing history" do that?


    Richard Mueller - MVP Directory Services


    Robert gave the pro answer. I was just going to say "yes". =^)

    Ed Price (a.k.a User Ed), SQL Server Experience Program Manager (Blog, Twitter, Wiki)

    Friday, September 14, 2012 2:13 AM
    Owner
  • Sorry, this problem doesn't turn up often. Now (at this moment) I see only the scroll bar in any code block that has only one line. However, I'm using a Dell laptop. The F5 button (and most other F buttons) have been taken over by Dell for other functions. I have no F5 or Ctrl-F5 or F12. I used View, Refresh in place of F5. I can find no menu selection labeled Ctrl-F5. I found Developer Tools in the Tool menu, but I don't know how to use it (without F buttons).

    OK, I went to Developer Tools and clicked Start Capturing, then I selected View, Refresh (F5). Lots of information that means nothing to me. The scroll bars still hide the line of code.

    Now I tried Developer Tooks, Ctrl-d, Ctrl-backtab, View Refresh (F5). Still scroll bar hides the code. Should I be trying to understand the HTML that shows up? There is a lot of it. I managed to save the HTML, but it is too large to post here.


    Richard Mueller - MVP Directory Services

    Thursday, September 20, 2012 5:17 PM
    Moderator
  • The F5 button (and most other F buttons) have been taken over by Dell for other functions. I have no F5 or Ctrl-F5 or F12.

    Unfortunately that command is only available as a keystroke.   I can hardly believe that your keyboard would not provide that combination (perhaps in conjunction with pressing an F-Lock and Fn key too <w>) but an alternative would be to use the Onscreen Keyboard (e.g. Run... osk.exe) and do the Ctrl-F5 with it.   You could do the F12 that way too, e.g. if there was no other way of doing what it does.

    Glad that you found an alternative to pressing F12.  The point about using the IE9 Developer Tools was

      • to provide a potentially more complete alternative to pressing Ctrl-F5 (e.g. the Clear cache for domain command) without the disruption which might be caused by (the most complete,) clearing of the TIF completely.
      • to provide the Network capture as a way of checking if cache-checking had been avoided by using any cache-avoiding or cache-clearing procedure (or whether one was even necessary).   E.g. if you see response codes of 302 instead of 200 you can assume that cache-checking is being used and vice versa.
      • To give you a way of seeing the difference in HTML, if avoiding using the cache had resulted in a more desirable outcome.   Sounds like you don't need to bother about that possibility yet.   ;  )

     
    FYI

     
    Robert
    ---

    Thursday, September 20, 2012 7:46 PM
  • Thanks for your help Robert. The Fn key seems to help. When I use Fn-F12, Ctrl-d I get the message  "Are you sure you want to clear the browser cache for this domain?", and I click "Yes". I also used Fn-Ctrl-F5 and the display refreshed. Similar when I used Fn-F12, Ctrl-backtab, Fn-F5. In all cases, the scroll bar still hides the line of code.


    Richard Mueller - MVP Directory Services

    Thursday, September 20, 2012 8:33 PM
    Moderator
  • In all cases, the scroll bar still hides the line of code.

    Then the easiest way that I can think of to check whether it is a rendering error or an HTML source error (e.g. the problem that you suspect of having a bad host) is to use the Developer Tools Find tool to help you capture just the HTML of the problem element.   Do that also when it looks Ok and compare the sources.   If the sources are the same you may have a rendering problem and if different it would be nice to know where they came from in each case in order to help identify a problem host.  I don't know how to do that.  In Answers they created a diagnostic comment embedded in the HTML source for exactly this kind of purpose.

    Actually I think just capturing the HTML source could leave open the issue about whether the related CSS is the same too.  So when you do the capture it might be best to use View, Source, Element source with style.   E.g. doing that seems to capture information which could be used to help explain the element's Trace Styles.   I don't know of any way to capture the latter but think that a discrepancy might show up there too--even with otherwise identical source.  So, unless you have a photographic memory, I think you may need a way of recording it and comparing two instances which were ostensibly the same.   <eg>

     
    Good luck

     
    Robert
    ---

    Friday, September 21, 2012 3:10 AM
  • I'll see if anything seems different later when the scroll bars no longer hide the code. For now, the problem is clearly in the <pre class="prettyprint"> tag, so the prettyprint class is suspect. There is also a prettyprint() java function that gets called. In both cases I don't see the code, and so far I cannot tell where they come from.


    Richard Mueller - MVP Directory Services

    Friday, September 21, 2012 3:48 PM
    Moderator
  • the problem is clearly in the <pre class="prettyprint"> tag, so the prettyprint class is suspect.

    Good clue.   FWIW I see your example with this (on IE10)

    <paste>

     <pre class="prettyprint prettyprinted">

    </paste>

    BTW what is with this horrible editor?   That "paste" above had to be heavily edited to get rid of a lot of "span...span...span..."   Makes the Monty Python crew look like pikers.   ;  }

    I was able to find instances of  prettyprinted  only in the Script section from  RequestReducedContent  files.   There were 3 instances:  the one that I got where it was appended to a class separated by a space, one where it would be removed, and one where it might be written to a console log, e.g. perhaps (somehow) during debugging.  The code is obfuscated but I was able to insert breakpoints for each occurrence.   I only saw instances of the first breakpoint hit.

     
    Robert
    ---

    Friday, September 21, 2012 4:26 PM
  • You probably used IE9 Compatibility Mode view the thread with the error. You may simply click the yellow highlighted as below to change your IE to be the none-compatibility mode. then you will find out the correct code on the forum.

    Detailed introduction is as below: http://windows.microsoft.com/en-US/windows7/How-to-use-Compatibility-View-in-Internet-Explorer-9

    Wednesday, October 10, 2012 1:30 AM
  • Amazing. After all this time the Compatibility Mode icon definitely fixes the problem. The icon needs to be dim (not colored). Thank you very much.


    Richard Mueller - MVP Directory Services

    Wednesday, October 10, 2012 5:39 PM
    Moderator