Browse the Ruby on Rails Community.

You are here: Forums Working With Rails Website a little bug...

Replytotopic

a little bug

Posted in Forums : Working With Rails Website

 
Profile

Authority 0
Posting Rating 62
Sign in to rate this post

Hi, i just found this little bug on the forum, take a look: http://www.workingwithrails.com/forums/1-general-discussion/topics/91-gedit-and-rails?page=1#posts-431
maybe it’s just me, but the rest of the threads look alrite.
im using FF in 1650:1080 on winxp

edited:
the same thing happens here, there’s no overflow block so longer words will just go straight through to the menu on the right. try css maybe?

 
Profile

Authority 25
Posting Rating 98
Sign in to rate this post

I have the same problem. I’m on Firefox on WinXP. Resolution 1600×1200.

It works fine in IE6 and IE7, just not in Firefox.

 
Profile

System Admin
Sign in to rate this post

The problem is with long strings that contain no spaces. Typically this is the case with URLs. It seems firefox doesn’t like to break those strings so it just renders them in one long line, even if doing so breaks out of the DIV that is supposed to contain them.

I’ll be releasing a whole load of code enhancements soon which include making the DIV in which the body of the message appears much wider and doing away with the sidebar on the right when reading forum posts. It doesn’t actually fix the above problem but it means it happens less and when it does it doesn’t look nearly so bad.

What I really need to do is parse a post when it is made and insert some spaces that Firefox can use to break on. But then anyone copy and pasting the URL rather than clicking on it will have problems.

Any other ideas for solutions?

 
Profile

Authority 25
Posting Rating 98
Sign in to rate this post

Well it might not be a great idea but you could set a max-width value and turn overflow:auto on with CSS. This would create a horizontal scroll bar on the fields that exceed the width and don’t wrap. max-width only works with Firefox and is disregarded by IE6 and lower but IE seems to be working fine already.

 
Profile

Authority 12
Posting Rating 0
Sign in to rate this post

You can also use this in your ruby code:

def split_str(str, len = 100) 
  fragment = /.{#{len}}/ 
  str.split(/(\s+)/).map! { |word| 
    (/\s/ === word) ? word : word.gsub(fragment, '\0 
' ) }.join end
 
Profile

Authority 25
Posting Rating 98
Sign in to rate this post

With all respect to Del, I feel pretty strongly about using CSS and valid XHTML only for layout and style. I don’t feel that it would necessarily be a good idea to resort to Ruby code for this type of challenge. The problem is in the markup and/or CSS and should be addressed at that level IMHO.

 
Profile

Authority 0
Posting Rating 62
Sign in to rate this post

I agree with Paul, overflow:automatic or maybe overflow:hidden would be the easiest options. as this is happening with link, nobody needs to see the whole link anyway, and they would still have access to it. the page will break right after the link, so no words will be missed with overflow:hidden. remember jsut not to put an absolute value for height.

 
Profile

System Admin
Sign in to rate this post

Just released a fix. Let me know if it doesn’t work!

Replytotopic

Other Recent Topics

Working With Rails Website : WWR Jobs daily digest received twice

Working With Rails Website : Rails Workshop with Adam Cooke

Working With Rails Website : Search does not degrade gracefully with javascript off

Working With Rails Website : syntax highlighting for .erb files

Working With Rails Website : ff 2.0.0.14 css issue

Working With Rails Website : some feedback from a job poster

Working With Rails Website : Is the hackfest still working?

Working With Rails Website : slight bug I think

Working With Rails Website : Next function for the WWR community?

Working With Rails Website : Safari RSS Reader - Small bug

Formatting Help
  • *bold*       _italics_      
    bq. (quotes)
  • "DSC":http://www.dsc.net
  • * or # (lists)
or cancel