Bug 26260

Summary: Caret positioning in contenteditable elements with mouse/keyboard fails when css :after is used
Product: WebKit Reporter: Nils Jeisecke <jeisecke>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: enrica, jeisecke, justin.garcia, morrita, nvasilyev, rniwa, tkent, tony
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Simple HTML example showing the problem none

Description Nils Jeisecke 2009-06-08 15:45:26 PDT
Consider the following editable paragrahp 

   <div contenteditable="true">
    <p><span class="x">6</span>Try to click before the 'T', won't work.</p>
   </div>

with the following styles

          .x { display: inline; font-weight: bold; color: green; }
          .x:before { content: "("; }
          .x:after { content: ") "; }

you cannot click before the 'T'. 

Remove the :after style and it works.
Comment 1 Nils Jeisecke 2009-06-08 15:46:31 PDT
Created attachment 31067 [details]
Simple HTML example showing the problem
Comment 2 Nikita Vasilyev 2020-06-22 22:37:56 PDT
Works fine. This has been likely fixed a while ago.