[Webkit-unassigned] [Bug 70823] New: Using the EditorCommand InsertText with spaces destroys the style.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 25 10:16:36 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=70823
Summary: Using the EditorCommand InsertText with spaces
destroys the style.
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: HTML Editing
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: mifenton at rim.com
Created an attachment (id=112353)
--> (https://bugs.webkit.org/attachment.cgi?id=112353&action=review)
Test to validate insertion.
Attempting to insert text using the InsertTextCommand code destroys the style of the selection if a space exists.
>From InsertTextCommand::doApply
// FIXME: This delete operation blows away the typing style.
if (endingSelection().isRange()) {
if (performTrivialReplace(m_text, m_selectInsertedText))
return;
deleteSelection(false, true, true, false);
}
The selection is deleted if a trivial replacement cannot be done.
>From InsertTextCommand::performTrivialReplace
if (text.contains('\t') || text.contains(' ') || text.contains('\n'))
return false;
Trivial replacement only occurs when none of the above characters are present.
--
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