<?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>67464</bug_id>
          
          <creation_ts>2011-09-01 21:24:54 -0700</creation_ts>
          <short_desc>Invalid selection made temporarily when entering text in textfield</short_desc>
          <delta_ts>2013-02-04 11:33:52 -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>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>62092</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Sadrul Habib Chowdhury">sadrul</reporter>
          <assigned_to name="Varun Jain">varunjain</assigned_to>
          <cc>ap</cc>
    
    <cc>fsamuel</cc>
    
    <cc>leandro</cc>
    
    <cc>rjkroege</cc>
    
    <cc>rniwa</cc>
    
    <cc>varunjain</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>461035</commentid>
    <comment_count>0</comment_count>
    <who name="Sadrul Habib Chowdhury">sadrul</who>
    <bug_when>2011-09-01 21:24:54 -0700</bug_when>
    <thetext>Reproduction steps:

 * Enter some text in a textfield.
 * Press &apos;Home&apos; to go to the beginning of the textfield.
 * Press any key to insert some text.

FrameSelection::selection becomes invalid, because it returns true from isRange() in WebCore::EditorClient::respondToChangedSelection callback.

The following comment for VisibleSelection::setWithoutValidation may be of interest (or maybe not):

// FIXME: This function breaks the invariant of this class.
// But because we use VisibleSelection to store values in editing commands for use when
// undoing the command, we need to be able to create a selection that while currently
// invalid, will be valid once the changes are undone. This is a design problem.
// To fix it we either need to change the invariants of VisibleSelection or create a new
// class for editing to use that can manipulate selections that are not currently valid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>461216</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Kroeger">rjkroege</who>
    <bug_when>2011-09-02 07:28:02 -0700</bug_when>
    <thetext>Varun: I think you ought to take a look at this eventually.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>464423</commentid>
    <comment_count>2</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-09-08 15:11:38 -0700</bug_when>
    <thetext>Also see https://bugs.webkit.org/show_bug.cgi?id=62092.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>823884</commentid>
    <comment_count>3</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-02-03 14:16:53 -0800</bug_when>
    <thetext>I think we&apos;ve fixed this bug in the latest WebKit. Could you check that?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>824583</commentid>
    <comment_count>4</comment_count>
    <who name="Varun Jain">varunjain</who>
    <bug_when>2013-02-04 11:06:53 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; I think we&apos;ve fixed this bug in the latest WebKit. Could you check that?

yes.. I dont see this anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>824607</commentid>
    <comment_count>5</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-02-04 11:33:52 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 62092 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>