By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,148 Members | 779 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,148 IT Pros & Developers. It's quick & easy.

fixing stretching textarea's in firefox

P: n/a
in firefox, long strings without spaces cause a horozontal scrollbar to
appear at the bottom of any given textarea. for example, if your
textarea supports 50 characters, and 100 consecutive non-space
characters are entered, stretching will occur. is there a fix for
this, using javascript?

Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"yawnmoth" <te*******@yahoo.com> schreef in bericht
news:11**********************@f14g2000cwb.googlegr oups.com...
in firefox, long strings without spaces cause a horozontal scrollbar to
appear at the bottom of any given textarea. for example, if your
textarea supports 50 characters, and 100 consecutive non-space
characters are entered, stretching will occur. is there a fix for
this, using javascript?


Who is gonna type a 50 character word?

grt Bert
Jul 23 '05 #2

P: n/a
yawnmoth wrote:
in firefox, long strings without spaces cause a horozontal scrollbar to
appear at the bottom of any given textarea. for example, if your
textarea supports 50 characters, and 100 consecutive non-space
characters are entered, stretching will occur. is there a fix for
this, using javascript?


You need to define what a 'fix' is. Do you mean prevent the
scroll bars from showing so that the extra characters are
present but not displayed, or do you mean some form of wrapping
of the line of text?

If the intention is to wrap the text, please explain the logic
to be used to insert characters to break the line:

1. What character should be used to break the string: return,
newline or space?

2. Should the new character simply be inserted at char 50 or
should some other logic apply? e.g. if there is a space
within the last 50 characters, don't insert a break,
otherwise do.

3. If a break is inserted and the user types say 120 characters,
how does the script determine where to put breaks? Does it
just remove all breaks and insert new ones at 50 character
intervals?

4. As above, but the user has pasted text into the text area.

5. What to do if the user inserts say 40 characters, then goes
back to the start and inserts 30 more characters - then
deletes 20. How does the script know that it inserted a
break, and where is the script-inserted break now, were
characters deleted before or after it?

6. /Et cetera/.

Perhaps a scroll bar is a good idea after all...

--
Rob
Jul 23 '05 #3

P: n/a

Bert wrote:
"yawnmoth" <te*******@yahoo.com> schreef in bericht
news:11**********************@f14g2000cwb.googlegr oups.com...
<snip>

Who is gonna type a 50 character word?


someone pasting a url into a textarea with more than 50 consecutive
non-space characters? url's from google groups, as an example, are
easily more than 50 consecutive non-space characters long.

Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.