Bug 26442

Summary: [:first-letter ][contenteditable] Typing at the end of an contenteditable element having a :first-letter style applied on it only replaces the last character in the element
Product: WebKit Reporter: Dan POPA <dpopa>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ap, bero, jparent, justin.garcia, mitz, rfjaimes, thaddee6yann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 58911    
Attachments:
Description Flags
Testcase showing described behavior none

Description Dan POPA 2009-06-16 06:27:00 PDT
Typing at the end of an contenteditable element having a :first-letter style applied on it only replaces the last character in the element.

<style>
.someclass:first-letter {
	font-weight: bold;
}
</style>
<div class="someclass" contenteditable="true">Some text</div>

Click at the end of the DIV and start typing.
Actual result: the last character from the DIV is replaced with the typed character.
Comment 1 Dan POPA 2009-06-16 06:27:46 PDT
Created attachment 31346 [details]
Testcase showing described behavior
Comment 2 thaddee6yann 2009-09-29 12:21:07 PDT
Another linked misbehaviour:
Typing a space at the end of the very same editable region duplicates the text.
Comment 3 mitz 2010-10-06 16:55:09 PDT
*** Bug 41514 has been marked as a duplicate of this bug. ***
Comment 4 Ronald Jaimes 2011-10-19 14:50:33 PDT
the same bug occurs in Windows