Bug 62072 - [testcase] empty lines inserted into selection
Summary: [testcase] empty lines inserted into selection
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: 4.5.4
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-03 18:45 UTC by Ingo Klöcker
Modified: 2021-03-21 22:07 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
first test case which demonstrates wrong behavior (174 bytes, text/html)
2003-08-03 18:46 UTC, Ingo Klöcker
Details
second test case which demonstrates correct behavior (167 bytes, text/html)
2003-08-03 18:47 UTC, Ingo Klöcker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Klöcker 2003-08-03 18:45:37 UTC
Version:           4.0 (using KDE 3.1.9)
Compiler:          gcc version 3.3 20030226 (prerelease) (SuSE Linux)
OS:          Linux (i686) release 2.4.20-4GB

Under certain circumstances empty lines are inserted into a selected block of lines, i.e. if one selects such a block, copies it to the clipboard and then pastes it then one ends up with empty lines between the lines.

I'll attach two sample HTML files.

1) empty_line_inserted.html:

If one selects Line 1 till Line 4 and then pastes the selection then one gets:
Line 1
 
Line 2
 
 
Line 3
Line 4

So there is one empty line between Line 1 and Line 2 and there are two empty lines between Line 2 and Line 3.

2) no_empty_line_inserted.html:

If one selects Line 1 till Line 4 and then pastes the selection then one gets:
Line 1
Line 2

Line 3
Line 4

This is correct behavior.

Note that the only difference between both HTML files is
a) empty_line_inserted.html has an additional <br>
b) empty_line_inserted.html has a few linebreaks, i.e. '\n', to improve the readability of the source code.

Since in HTML all whitespace (including linebreaks) is to be ignored it's surprising that the linebreaks make a difference.
Comment 1 Ingo Klöcker 2003-08-03 18:46:49 UTC
Created attachment 2143 [details]
first test case which demonstrates wrong behavior
Comment 2 Ingo Klöcker 2003-08-03 18:47:27 UTC
Created attachment 2144 [details]
second test case which demonstrates correct behavior
Comment 3 Marijn Schouten 2006-04-18 18:29:00 UTC
confirmed in 3.5.2 and very similar to Bug 58111
Comment 4 Michael Leupold 2008-04-06 06:20:20 UTC
Confirmed on trunk r793971.
Behaviour is slightly different. empty_line_inserted.html yields:
Line1
Line2


Line3
Line4
Comment 5 Samuel Brack 2011-01-02 16:42:10 UTC
Confirmed in 4.5.4, like described in comment 4.
Comment 6 Justin Zobel 2021-03-21 00:24:51 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 10 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 7 Ingo Klöcker 2021-03-21 22:07:02 UTC
This seems to have been fixed. It's no longer reproducible with 20.12.1.