953,971 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Scrolling a Code Block

When I'm scrolling through a post that contains a block of code, I get a leftover line in the block with each scrolling.
Firefox 1.5.0.4, Win2k SP4.

Attachments CodeScroll.jpg 32.85KB
Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

As I'm sure you've experienced, when code snippet lines get way too long, a horizontal scrollbar automatically appears to accomidate this. Since code snippets are a fixed height, that extra space is reserved to make room for a scrollbar if one is needed.

cscgal
The Queen of DaniWeb
Administrator
19,420 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

I mean these (I'm not sure if you did too):

Attachments CodeScroll2.jpg 83KB
Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

Oh!! I don't see that? Do you see it in all web browsers? Can anyone else confirm?

cscgal
The Queen of DaniWeb
Administrator
19,420 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

Right now, I am not experiencing it, but I remember seeing those lines in my browser. Not always though. Either when my computer or network is on a heavy load.

WolfPack
Postaholic
Moderator
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115
 

Yes I first noticed that ages ago....

http://www.daniweb.com/techtalkforums/thread46337.html

although, it doesn't appear all the time.

iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 

Hmm ... only when your computer is under heavy load? Is it possible it's a browser rendering issue on your end. What would be great to know is if the same post sometimes displays it and sometimes doesn't. That will let me debug whether it's a condition on my end that is causing this problem or not.

cscgal
The Queen of DaniWeb
Administrator
19,420 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

I get it "sometimes". It seems to have to do with the alignment of the text box on the size of the page from what I can tell.

Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 
Hmm ... only when your computer is under heavy load? Is it possible it's a browser rendering issue on your end. What would be great to know is if the same post sometimes displays it and sometimes doesn't. That will let me debug whether it's a condition on my end that is causing this problem or not.

Okay. Got this problem again. See the image attached. I always get it for that particular reply in this thread . The other replies for the same thread are not affected. Only the one I have shown. Also I dont get it in my desktop computer. Only in my laptop.
I think this will be a tough one Dani.

Attachments code-render-issue.PNG 60.22KB
WolfPack
Postaholic
Moderator
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115
 

Do you use the same web browser on your desktop and laptop computers? Are both using the exact same version numbers (including minor version #)?

cscgal
The Queen of DaniWeb
Administrator
19,420 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

Yes. Firefox 1.5.0.4

WolfPack
Postaholic
Moderator
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115
 

Does this only happen with

code tags


or does it also happen with [php]php tags[/php] or [html]html tags[/html]?

cscgal
The Queen of DaniWeb
Administrator
19,420 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

I don't know. The forums I read use only code tags. I checked some posts in the PHP section, but they looked fine. But then again, I don't see this problem for all posts with code tags, so can't be sure.

WolfPack
Postaholic
Moderator
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115
 

You're really making it tough for me ... it happens some of the time on some of your computers but I never experience it on any of my windows machines or my mac in IE, Firefox, or Safari web browsers. :(

cscgal
The Queen of DaniWeb
Administrator
19,420 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 
You're really making it tough for me ... it happens some of the time on some of your computers but I never experience it on any of my windows machines or my mac in IE, Firefox, or Safari web browsers. :(

Yeah Dani. I understand. You can't debug a problem unless you can reproduce it in your side. All I can say is that some postsalways give that problem in the same computer (for example the post I showed still gives me the same problem on my laptop), and some do not give it at all. Anyways I can live with it. Just keep your eyes open when you browse the C/C++ section. maybe you will find a post that is like that on one of your computers too.
Or you could come see it for yourself...ready to make a trip to Japan :cheesy: ?

WolfPack
Postaholic
Moderator
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115
 

Okay Dani. It seems that my work computer shows the above posts in the same way. Same browser too. Firefox 1.5.0.4. So I don't think it is random as such.

WolfPack
Postaholic
Moderator
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115
 

I get the lines too but only in FireFox 1.5.0.4 not IE 6 (always updated to latest)

Whats more if I switch from a maximized firefox on this post to some other maximaized window and back again the lines are gone, if I scroll the code window off the bottom of the screen and back up again the lines come back.

So it's gotta be windows graphics api (directx maybe) and repaint events. Maybe something broke in a windows update recently ? to make us all go and buy Vista when it finally arrives!

Wierd I've never seen it before going to the post Wolfpack shows in his screen dump. Maybe if a code window has specific proportions the pixel to twips algorithm breaks down in the bowls of the OS someplace.

Wolfpacks screen shows 8 lines, I only get 2. Most bizarre!

Yeah it's definitely a redraw thing, if I select the code the lines are "rubbed out", they are the top and bottom of the code window border not being redrawn properly, so it's either dodgy browser rendering or undocumented feature in the API.

I've read Firefox is a bit trigger happy on wheely mouse scroll event firing, perhaps it clogs the message queue and some repaints don't get a chance.

Even more bizarre, the slower I scroll the more lines I get !! if I scroll with mouse inline codey wodey wheel I get two lines always, if I slowly drag the browser verticle scroll bar I get squillions!

codey wodey code
:
:
code code code
:
:
Attachments squillions.JPG 132.66KB
hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
 

Ok I done some more testing it only happens after I add inline code tags as well as normal code tags in the post.

Hey there ya go you can have that for free. He he..

hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
 

Another thing it only happens scrolling the post from off bottom of screen up (scroll bar sliding down), not when scrolling post off top of screen down (scroll bar sliding up).

hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
 
Ok I done some more testing it only happens after I add inline code tags as well as normal code tags in the post.


This is a very good observation. I get the same thing at my end too. Both at Work and Home. Well Done. :!: :idea:

WolfPack
Postaholic
Moderator
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You