<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>26635</bug_id>
          
          <creation_ts>2009-06-22 17:53:11 -0700</creation_ts>
          <short_desc>cursor movement and text selection doesn&apos;t work with floats</short_desc>
          <delta_ts>2009-12-03 10:18:20 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>HTML Editing</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>GoogleBug</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ojan Vafai">ojan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>darin</cc>
    
    <cc>enrica</cc>
    
    <cc>eric</cc>
    
    <cc>hyatt</cc>
    
    <cc>michaelthomas</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>127526</commentid>
    <comment_count>0</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2009-06-22 17:53:11 -0700</bug_when>
    <thetext>Attached test cases coming.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127532</commentid>
    <comment_count>1</comment_count>
      <attachid>31697</attachid>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2009-06-22 17:58:59 -0700</bug_when>
    <thetext>Created attachment 31697
test case

Two problems in this test case.

1. Click before &quot;1d&quot;. 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 &quot;1J&quot;. 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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127534</commentid>
    <comment_count>2</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2009-06-22 18:01:34 -0700</bug_when>
    <thetext>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&apos;ve hit this in the wild (in gmail specifically), it makes me wonder if we should try to do better.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>167792</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Thomas">michaelthomas</who>
    <bug_when>2009-12-01 17:08:04 -0800</bug_when>
    <thetext>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:
&lt;div&gt;a&lt;/div&gt;&lt;span&gt;b&lt;/span&gt;
- Place the cursor before &apos;a&apos;.
- 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>168059</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-12-02 10:42:10 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; I am able to reproduce this bug without using floats:

What makes that the same bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>168101</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Thomas">michaelthomas</who>
    <bug_when>2009-12-02 11:30:13 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; I am able to reproduce this bug without using floats:
&gt; 
&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>168450</commentid>
    <comment_count>6</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2009-12-03 10:18:20 -0800</bug_when>
    <thetext>Michael, I don&apos;t see how this is a superset. The reproduction steps and the symptoms are totally different. I filed bug 32123 for that case..</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>31697</attachid>
            <date>2009-06-22 17:58:59 -0700</date>
            <delta_ts>2009-06-22 17:58:59 -0700</delta_ts>
            <desc>test case</desc>
            <filename>float2.html</filename>
            <type>text/html</type>
            <size>137</size>
            <attacher name="Ojan Vafai">ojan</attacher>
            
              <data encoding="base64">PGRpdiBjb250ZW50RWRpdGFibGUgc3R5bGU9ImJvcmRlcjoxcHggc29saWQiPgo8ZGl2Pgo8ZGl2
IHN0eWxlPSJmbG9hdDogbGVmdDsiPjE8L2Rpdj4KSgo8L2Rpdj4KPGRpdiBzdHlsZT0iZmxvYXQ6
IGxlZnQ7Ij4xPC9kaXY+ZAo8L2Rpdj4=
</data>

          </attachment>
      

    </bug>

</bugzilla>