Bug 14792 - REGRESSION: Copy inserts carriage return in middle of selection
Summary: REGRESSION: Copy inserts carriage return in middle of selection
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P1 Normal
Assignee: Nobody
URL: http://simonsrock.facebook.com/inbox/...
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2007-07-27 15:06 PDT by Cameo Wood
Modified: 2007-08-25 05:26 PDT (History)
3 users (show)

See Also:


Attachments
source of offending page (18.42 KB, text/html)
2007-07-27 15:09 PDT, Cameo Wood
no flags Details
Do not emit newlines around floating or positioned blocks (10.07 KB, patch)
2007-08-08 13:54 PDT, mitz
justin.garcia: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cameo Wood 2007-07-27 15:06:57 PDT
When copying a url from a facebook page, (html from page is attached) the selection is truncated.

I am trying to copy the url: "http://loicandhugh.eventbrite.com/"

and when I copy it via Safari, it copies instead:
"http://loicandhugh.eventbr
ite.com/" 
with a carriage return in the middle of the url, causing it to appear to be truncated when one pasts it into the address field.
Comment 1 Cameo Wood 2007-07-27 15:09:19 PDT
Created attachment 15710 [details]
source of offending page

I should mention this behaviour does not happen in IE or Firefox
Comment 2 David Kilzer (:ddkilzer) 2007-07-28 07:43:27 PDT
The HTML being copied looks like this:

<span>http://loicandhugh.eventbr</span><wbr></wbr><span class="word_break"></span>ite.com/

This does not occur with Safari 2.0.4 (419.3) with original WebKit on Mac OS X 10.4.10 (8R218), so it's a regression.

Comment 3 David Kilzer (:ddkilzer) 2007-07-28 07:50:56 PDT
<rdar://problem/5367763>
Comment 4 mitz 2007-07-28 08:34:44 PDT
Even simpler:

foo<span style="float:left"></span>bar
Comment 5 mitz 2007-08-08 13:54:54 PDT
Created attachment 15873 [details]
Do not emit newlines around floating or positioned blocks

The change, as well as the updated test results, matches WinIE behavior.
Comment 6 Justin Garcia 2007-08-08 16:17:24 PDT
Mitz what does this do to spellchecking of words at the beginning or end of a floating or positioned block?  As in:

<div contenteditable="true">please<div style="float: right;">test</div>this</div>

Since we no longer emit newlines before and after this block, won't pleasetestthis be passed to the spellchecker?
Comment 7 mitz 2007-08-08 23:58:34 PDT
(In reply to comment #6)
> Since we no longer emit newlines before and after this block, won't
> pleasetestthis be passed to the spellchecker?

That's exactly what happens.
Comment 8 Justin Garcia 2007-08-09 00:24:11 PDT
Comment on attachment 15873 [details]
Do not emit newlines around floating or positioned blocks

So now we'll incorrectly mark 'test' as misspelled whereas before where we'd fail to mark "pleasethis" as being misspelled.  Seems like we're no worse off, r=me.
Comment 9 Mark Rowe (bdash) 2007-08-25 05:26:58 PDT
Landed in r25234.