[Webkit-unassigned] [Bug 39801] REGRESSION (r45962): Pasted newlines are stripped on form submit at paste.nerv.fi

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 8 18:25:14 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=39801





--- Comment #16 from Ojan Vafai <ojan at chromium.org>  2010-06-08 18:25:13 PST ---
(In reply to comment #15)
> OK, it seems we were actually using <br> long time ago and Darin made a change so we are using <div> now.
> 
> http://trac.webkit.org/changeset/8229
> 
> I couldn't see the reason of the change, but I'm sure there were some reasons :) Darin, could you tell us why you made this change?

This is a little different. I think createFragmentFromText is used for creating a DOM from a plain-text string. It's not for creating a DOM within a plain-text element.

I think we might want to do something similar to what the code did before r8229 though. The difference is that we want to do it if we're creating a DOM for a plain-text context. We kind of do this already for the preserveNewline cases at http://trac.webkit.org/browser/trunk/WebCore/editing/markup.cpp#L1170.

My intuition is that we should add another case. If we're in a contentEditable=plaintext-only element (i.e. renderer->style->userModify == READ_WRITE_PLAINTEXT_ONLY), then the newlines should all be converted to BRs and then we return that DOM. That should fix textareas and, more generally, plaintext contentEditable regions.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list