B
bwucke
Is there any way to scroll textarea (to the bottom row) from Javascript
in Opera? The
textarea.scrollTop=textarea.scrollHeight+textarea.scrollTop;
approach doesn't work, and there's so many notices that it doesn't all
over the net, that if there's any solution/workaround to this problem
on the net, it's unfindable.
Alternatively (my workaround) is there any way to reliably count lines
of text in Textarea so I could crop the start of the text so all of it
fits if more is added? (note: newlines, word wrap, tabs and optionally
variable size fonts should be taken into account. My current approach
is to split text at newlines and count each as
Math.ceil(line.length/textarea.cols) textarea lines but it doesn't take
into account long words triggering faster line wraps, tabs etc so
sometimes I overflow and bottom line gets hidden as more text is added.
in Opera? The
textarea.scrollTop=textarea.scrollHeight+textarea.scrollTop;
approach doesn't work, and there's so many notices that it doesn't all
over the net, that if there's any solution/workaround to this problem
on the net, it's unfindable.
Alternatively (my workaround) is there any way to reliably count lines
of text in Textarea so I could crop the start of the text so all of it
fits if more is added? (note: newlines, word wrap, tabs and optionally
variable size fonts should be taken into account. My current approach
is to split text at newlines and count each as
Math.ceil(line.length/textarea.cols) textarea lines but it doesn't take
into account long words triggering faster line wraps, tabs etc so
sometimes I overflow and bottom line gets hidden as more text is added.