Summary: | cursor movement and text selection doesn't work with floats | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ojan Vafai <ojan> | ||||
Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | NEW --- | ||||||
Severity: | Normal | CC: | darin, enrica, eric, hyatt, michaelthomas, rniwa | ||||
Priority: | P2 | Keywords: | GoogleBug | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Ojan Vafai
2009-06-22 17:53:11 PDT
Created attachment 31697 [details]
test case
Two problems in this test case.
1. Click before "1d". Then hold shift and press the down arrow twice. That should select the last line (i.e. the 1d), but instead it selects all the editable content.
2. Click before the "1J". Hit the down arrow 4 times. Note that it never actually moves the cursor down! It moves the cursor *right* by 1 character each time.
This is a reduced test case from a bug I just hit in gmail. If you reply to any logged chat in gmail, the HTML looks something like this test case (although with a bunch more markup).
CCing people who know about the selection code. I imagine this bug is just a result of us skipping floated elements whenever we see them, but now that I've hit this in the wild (in gmail specifically), it makes me wonder if we should try to do better. I am able to reproduce this bug without using floats: - Go to the midas demo: http://www.mozilla.org/editor/midasdemo - Enter the following HTML: <div>a</div><span>b</span> - Place the cursor before 'a'. - Hold down shift and press the down arrow. - Note that the entire contentEditable element has been selected. This reproduces using any inline element in the place of the span. (In reply to comment #3) > I am able to reproduce this bug without using floats: What makes that the same bug? (In reply to comment #4) > (In reply to comment #3) > > I am able to reproduce this bug without using floats: > > What makes that the same bug? The bug I described seems to be a superset of this bug. i.e. the problem is not just floats, but any block element followed by an inline element. Note that the reproduction steps are identical. |