Bug 73495

Summary: khtml inserts superfluous spaces at end of lines in "wrap=physical" textarea fields
Product: [Applications] konqueror Reporter: Jens <jens-bugs.kde.org>
Component: khtml formsAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: adam
Priority: NOR    
Version: 4.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Test textarea which displays the problem

Description Jens 2004-01-25 22:16:38 UTC
Version:           4.0 (using KDE 3.1.94 (CVS >= 20031206),  (testing/unstable))
Compiler:          gcc version 3.3.3 20031229 (prerelease) (Debian)
OS:          Linux (i686) release 2.4.22b-w4l-p4

If I have a textarea like 

<TEXTAREA NAME="body_text" WRAP="PHYSICAL" COLS="80" ROWS="30">

and type some text into it, it flows (linebreaks are inserted). However, when I save the text and re-edit it (this is with PHPSlash), I get a couple (4-6) superfluous spaces at the end of each line.

If I use wrap=virtual this (obviously) doesn't happen.

Please investigate... I can provide a testcase if necessary.

This is using CVS from 02 January 2004.


Thank you!
Comment 1 Stephan Kulow 2004-01-26 17:43:51 UTC
yeah, we need a (non-php) test case.
Comment 2 Wanderlei Antonio Cavassin 2004-04-02 03:10:41 UTC
I have the same problem within bugzilla textarea. Unafortunately
the text was an email template, so all the emails that our bugzilla have
sent were plain broke - the lines between the header and body should be
empty lines, not lines with spaces.

Test case (or any bugzilla paremeters page):

<textarea wrap=hard name=passwordmail rows=10 cols=80>From: bugzilla-daemon     &#013;To: %mailaddress%     &#013;Subject: Your Bugzilla password.     &#013;&#013;&#013;To use the wonders of Bugzilla, you can use the following:     &#013;     &#013; E-mail address: %login%     &#013;       Password: %password%     &#013;     &#013; To change your password, go to:     &#013; %urlbase%userprefs.cgi     &#013;     </textarea>
Comment 3 Wanderlei Antonio Cavassin 2004-04-02 03:12:56 UTC
forgot to mention the version: kde 3.2.1 + fixes from 3.2.2 tree.
Comment 4 Jens 2004-11-02 14:50:31 UTC
Hello,

anybody who can still confirm this? Has anything been done regarding this bug?

Thank you!
Comment 5 Tommi Tervo 2005-08-17 16:21:52 UTC
*** Bug 77726 has been marked as a duplicate of this bug. ***
Comment 6 richardjones 2005-10-19 05:33:51 UTC
Created attachment 13046 [details]
Test textarea which displays the problem
Comment 7 richardjones 2005-10-19 05:34:25 UTC
This bug is still present in 3.4.3. It is also present if the wrap="hard" option is used.

Simple reproduction:

1. save the attached "test.html" file and load in konqueror
2. type some text and a newline
3. focus the mouse outside the textarea (ie. click outside it)
4. focus the mouse in the textarea again
5. spaces will have been appended to the lines in the area
6. repeat steps 2-4 to add additional spaces to the ends of lines
Comment 8 richardjones 2005-10-19 05:36:38 UTC
Semi-off-topic: I should also note that wrap="physical" is not valid HTML. It and "virtual" were historical anomalies introduced by Netscape 2.0 (and carried over in IE 4.0) and should not be used.
Comment 9 Maksim Orlovich 2006-01-28 22:08:14 UTC
Just fixed it (http://lists.kde.org/?l=kde-commits&m=113848188411690&w=2). Artifact of some funky behavior of QTextEdit -- it would append an extra space when you would ask it for paragraph text...