Bug 64962

Summary: Cannot click to position the caret to the right of an image with display:block style
Product: WebKit Reporter: Enrica Casucci <enrica>
Component: Layout and RenderingAssignee: Enrica Casucci <enrica>
Status: RESOLVED FIXED    
Severity: Normal Keywords: InRadar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: Unspecified   
Attachments:
Description Flags
Patch hyatt: review+

Description Enrica Casucci 2011-07-21 11:22:23 PDT
Try the following test case:

<div contentEditable="true">hello<img style="display:block;" src="http://images.apple.com/macosx/images/productheader_title.png">world</div>

Click to the left of the image. You'll see the caret being places to the left of the image.
Now try clicking to the right of the image. The caret is always placed to the left.
You can use the arrow keys to move to the right of the image, but the mouse click won't work.
This behaves as expected if the image has display:inline style.
Comment 1 Enrica Casucci 2011-07-21 11:22:36 PDT
<rdar://problem/9446343>
Comment 2 Enrica Casucci 2011-07-21 11:29:45 PDT
Created attachment 101613 [details]
Patch
Comment 3 Dave Hyatt 2011-07-21 11:34:13 PDT
Comment on attachment 101613 [details]
Patch

r=me
Comment 4 Enrica Casucci 2011-07-21 11:46:45 PDT
Committed revision 91481.