<?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>66630</bug_id>
          
          <creation_ts>2011-08-21 04:52:59 -0700</creation_ts>
          <short_desc>Selection cannot be set to only contain a non-spacing mark</short_desc>
          <delta_ts>2011-08-22 11:09:22 -0700</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>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://thottingal.in/bugs/js/selectionstart.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Santhosh Thottingal">santhosh.thottingal</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>junu.pv+public</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>454393</commentid>
    <comment_count>0</comment_count>
      <attachid>104626</attachid>
    <who name="Santhosh Thottingal">santhosh.thottingal</who>
    <bug_when>2011-08-21 04:52:59 -0700</bug_when>
    <thetext>Created attachment 104626
Sample HTML showing wrong selectionStart

Open the attached html in the browser and see the alert. The input field has a two character cluster with a combining character MALAYALAM VIRAMA
ഷ + ്  =&gt; ഷ് 
When we try to select at position range (1,2), Following are the results
   - Chrome: FAILS by returning 2,2 - returns the position after the cluster.
   - Firefox: OK - returns 1,2
   - Konqueror: OK - returns 1,2
   - IE: (not supported)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454530</commentid>
    <comment_count>1</comment_count>
    <who name="Junaid P V">junu.pv+public</who>
    <bug_when>2011-08-22 04:16:36 -0700</bug_when>
    <thetext>As part of our Mediawiki extension Narayam[1], we have to use selectionStart for its efficient working. Currently no support for webkit browsers as of this bug. Alse see the bug report 30130 at bugzilla of Wikemedia projects[2].

We have a workaround but that is very inefficient.


[1] http://www.mediawiki.org/wiki/Extension:Narayam
[2] https://bugzilla.wikimedia.org/show_bug.cgi?id=30130</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454709</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-08-22 11:09:22 -0700</bug_when>
    <thetext>The bug title is incorrect. It&apos;s not that selectionStart returns a wrong value. Selection range is actually set to (2, 2), because (1, 2) is not a meaningful selection from user point of view.

We have other bugs asking not to validate selection that was set programmatically. See bug 15256 and related ones.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>104626</attachid>
            <date>2011-08-21 04:52:59 -0700</date>
            <delta_ts>2011-08-21 04:52:59 -0700</delta_ts>
            <desc>Sample HTML showing wrong selectionStart</desc>
            <filename>selectionstart.html</filename>
            <type>text/html</type>
            <size>714</size>
            <attacher name="Santhosh Thottingal">santhosh.thottingal</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgU3RyaWN0Ly9FTiIg
Imh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXN0cmljdC5kdGQiPgo8aHRt
bCB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCI+CiA8aGVhZD4KICA8dGl0bGU+
PC90aXRsZT4KIDxtZXRhIGh0dHAtZXF1aXY9IkNvbnRlbnQtVHlwZSIgY29udGVudD0idGV4dC9o
dG1sOyBjaGFyc2V0PVVURi04IiA+CiA8L2hlYWQ+CiA8Ym9keT4KICA8ZGl2PjxpbnB1dCBpZD0i
dGVzdCIgdmFsdWU9IuC0t+C1jSIgLz48L2Rpdj4KICA8ZGl2PlRoaXMgc2NyaXB0IHNob3VsZCBh
bGVydDogMSwgMjwvZGl2PgogIDxkaXY+CiAgIC0gQ2hyb21lOiBGQUlMUzxici8+CiAgIC0gRmly
ZWZveDogT0s8YnIvPgogICAtIEtvbnF1ZXJvcjogT0s8YnIvPgogICAtIElFOiAobm90IHN1cHBv
cnRlZCkKICA8L2Rpdj4KICA8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+Ly88IVtDREFU
QVsKICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3Rlc3QnKS5zZXRTZWxlY3Rpb25SYW5nZSgx
LDIpCiAgIGFsZXJ0KGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCd0ZXN0Jykuc2VsZWN0aW9uU3Rh
cnQrJywgJytkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgndGVzdCcpLnNlbGVjdGlvbkVuZCkKICAv
L11dPjwvc2NyaXB0PgogPC9ib2R5Pgo8L2h0bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>