Bug 70823

Summary: Using the EditorCommand InsertText with spaces destroys the style.
Product: WebKit Reporter: Mike Fenton <mifenton>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED    
Severity: Normal CC: rniwa, tonikitoo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test to validate insertion. none

Mike Fenton
Reported 2011-10-25 10:16:36 PDT
Created attachment 112353 [details] 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.
Attachments
Test to validate insertion. (3.20 KB, patch)
2011-10-25 10:16 PDT, Mike Fenton
no flags
Note You need to log in before you can comment on or make changes to this bug.