<?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>96734</bug_id>
          
          <creation_ts>2012-09-14 01:27:48 -0700</creation_ts>
          <short_desc>Cannot select text within a label element that is linked to an input field</short_desc>
          <delta_ts>2024-12-25 00:27:21 -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>Forms</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>OS X 10.6</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=259557</see_also>
          <bug_file_loc>http://jsfiddle.net/FpcTz/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BlinkMergeCandidate, BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>259558</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter>ben</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>akeerthi</cc>
    
    <cc>commit-queue</cc>
    
    <cc>forms-bugs</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>720430</commentid>
    <comment_count>0</comment_count>
    <who name="">ben</who>
    <bug_when>2012-09-14 01:27:48 -0700</bug_when>
    <thetext>1. Go to: http://jsfiddle.net/FpcTz/
2. Try and select the label text either by double clicking or dragging over some of it.

The selection is lost and focus jumps to the field next to it. This happens for text within label tags that is linked to an input via the &apos;for&apos; attribute.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907526</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-10-22 04:57:43 -0700</bug_when>
    <thetext>This to merge following Blink Commit - 

https://src.chromium.org/viewvc/blink?view=revision&amp;revision=174296

In Webkit GitHub source here:

https://github.com/WebKit/WebKit/blob/51974bdf186d0771e79b230316ed0cddc5293f88/Source/WebCore/html/HTMLLabelElement.cpp#L136

___

It fails following test - https://jsfiddle.net/9pznh8ak/show</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1909183</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-10-29 17:43:39 -0700</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #1)
&gt; This to merge following Blink Commit - 
&gt; 
&gt; https://src.chromium.org/viewvc/blink?view=revision&amp;revision=174296
&gt; 
&gt; In Webkit GitHub source here:
&gt; 
&gt; https://github.com/WebKit/WebKit/blob/
&gt; 51974bdf186d0771e79b230316ed0cddc5293f88/Source/WebCore/html/
&gt; HTMLLabelElement.cpp#L136
&gt; 
&gt; ___
&gt; 
&gt; It fails following test - https://jsfiddle.net/9pznh8ak/show

I tried to merge this:

https://github.com/WebKit/WebKit/pull/5676

and the issue is:

```
        auto control = this-&gt;control();
```

If I try to change it to RefPtr then it leads to build failures. If I don&apos;t then it compiles but crashes on following test:

imported/blink/fast/forms/label/detached-document.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1916377</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-12-02 16:08:25 -0800</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #2)
&gt; (In reply to Ahmad Saleem from comment #1)
&gt; &gt; This to merge following Blink Commit - 
&gt; &gt; 
&gt; &gt; https://src.chromium.org/viewvc/blink?view=revision&amp;revision=174296
&gt; &gt; 
&gt; &gt; In Webkit GitHub source here:
&gt; &gt; 
&gt; &gt; https://github.com/WebKit/WebKit/blob/
&gt; &gt; 51974bdf186d0771e79b230316ed0cddc5293f88/Source/WebCore/html/
&gt; &gt; HTMLLabelElement.cpp#L136
&gt; &gt; 
&gt; &gt; ___
&gt; &gt; 
&gt; &gt; It fails following test - https://jsfiddle.net/9pznh8ak/show
&gt; 
&gt; I tried to merge this:
&gt; 
&gt; https://github.com/WebKit/WebKit/pull/5676
&gt; 
&gt; and the issue is:
&gt; 
&gt; ```
&gt;         auto control = this-&gt;control();
&gt; ```
&gt; 
&gt; If I try to change it to RefPtr then it leads to build failures. If I don&apos;t
&gt; then it compiles but crashes on following test:
&gt; 
&gt; imported/blink/fast/forms/label/detached-document.html

While trying to find equivalent of &quot;LocalFrame.h&quot; header, it seems that Webkit has &quot;Frame.h&quot; as equivalent. I might try to add it and push it again in future but just wanted to comment so if someone else know, they can fix try it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1951377</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-04-26 11:15:49 -0700</bug_when>
    <thetext>Committed 263420@main (01527bde3937): &lt;https://commits.webkit.org/263420@main&gt;

Reviewed commits have been landed. Closing PR #12503 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1951378</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-04-26 11:16:24 -0700</bug_when>
    <thetext>&lt;rdar://problem/108566491&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1968436</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2023-07-27 06:42:01 -0700</bug_when>
    <thetext>Re-opened since this is blocked by bug 259558</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1968567</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-07-27 20:17:13 -0700</bug_when>
    <thetext>New tracking radar:

rdar://113011484</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1982232</commentid>
    <comment_count>8</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-10-03 14:42:46 -0700</bug_when>
    <thetext>We might need to add following as well:

https://src.chromium.org/viewvc/blink?view=revision&amp;revision=182131

and

https://src.chromium.org/viewvc/blink?view=revision&amp;revision=185576</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2083854</commentid>
    <comment_count>9</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-12-25 00:25:17 -0800</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #1)
&gt; This to merge following Blink Commit - 
&gt; 
&gt; https://src.chromium.org/viewvc/blink?view=revision&amp;revision=174296
&gt; 
&gt; In Webkit GitHub source here:
&gt; 
&gt; https://github.com/WebKit/WebKit/blob/
&gt; 51974bdf186d0771e79b230316ed0cddc5293f88/Source/WebCore/html/
&gt; HTMLLabelElement.cpp#L136
&gt; 
&gt; ___
&gt; 
&gt; It fails following test - https://jsfiddle.net/9pznh8ak/show

SVN is gone - https://github.com/chromium/chromium/commit/56bbe7a3ca5fa03484b2852188778b03be9fd8a3

and https://github.com/chromium/chromium/commit/6dbe5851b1abf2f6157c2abdb678209d3a92eca3

and https://github.com/chromium/chromium/commit/d57ffe6d165e3a7d45d8a6f0af2a125d83ab514a

and https://github.com/chromium/chromium/commit/b33fd86d989afbd66fd795690c9d4c34bb9836d5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2083855</commentid>
    <comment_count>10</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-12-25 00:27:21 -0800</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #9)
&gt; (In reply to Ahmad Saleem from comment #1)
&gt; &gt; This to merge following Blink Commit - 
&gt; &gt; 
&gt; &gt; https://src.chromium.org/viewvc/blink?view=revision&amp;revision=174296
&gt; &gt; 
&gt; &gt; In Webkit GitHub source here:
&gt; &gt; 
&gt; &gt; https://github.com/WebKit/WebKit/blob/
&gt; &gt; 51974bdf186d0771e79b230316ed0cddc5293f88/Source/WebCore/html/
&gt; &gt; HTMLLabelElement.cpp#L136
&gt; &gt; 
&gt; &gt; ___
&gt; &gt; 
&gt; &gt; It fails following test - https://jsfiddle.net/9pznh8ak/show
&gt; 
&gt; SVN is gone -
&gt; https://github.com/chromium/chromium/commit/
&gt; 56bbe7a3ca5fa03484b2852188778b03be9fd8a3
&gt; 
&gt; and
&gt; https://github.com/chromium/chromium/commit/
&gt; 6dbe5851b1abf2f6157c2abdb678209d3a92eca3
&gt; 
&gt; and
&gt; https://github.com/chromium/chromium/commit/
&gt; d57ffe6d165e3a7d45d8a6f0af2a125d83ab514a
&gt; 
&gt; and
&gt; https://github.com/chromium/chromium/commit/
&gt; b33fd86d989afbd66fd795690c9d4c34bb9836d5

https://github.com/chromium/chromium/commit/5db23fe6d7151affeaf8b84ac2b16cf1603c456d</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>