Bug 96734
Summary: | Cannot select text within a label element that is linked to an input field | ||
---|---|---|---|
Product: | WebKit | Reporter: | ben |
Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
Status: | REOPENED | ||
Severity: | Normal | CC: | ahmad.saleem792, akeerthi, commit-queue, forms-bugs, rniwa, webkit-bug-importer |
Priority: | P2 | Keywords: | BlinkMergeCandidate, BrowserCompat, InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | OS X 10.6 | ||
URL: | http://jsfiddle.net/FpcTz/ | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=259557 | ||
Bug Depends on: | 259558 | ||
Bug Blocks: |
ben
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 'for' attribute.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
This to merge following Blink Commit -
https://src.chromium.org/viewvc/blink?view=revision&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
Ahmad Saleem
(In reply to Ahmad Saleem from comment #1)
> This to merge following Blink Commit -
>
> https://src.chromium.org/viewvc/blink?view=revision&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
I tried to merge this:
https://github.com/WebKit/WebKit/pull/5676
and the issue is:
```
auto control = this->control();
```
If I try to change it to RefPtr then it leads to build failures. If I don't then it compiles but crashes on following test:
imported/blink/fast/forms/label/detached-document.html
Ahmad Saleem
(In reply to Ahmad Saleem from comment #2)
> (In reply to Ahmad Saleem from comment #1)
> > This to merge following Blink Commit -
> >
> > https://src.chromium.org/viewvc/blink?view=revision&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
>
> I tried to merge this:
>
> https://github.com/WebKit/WebKit/pull/5676
>
> and the issue is:
>
> ```
> auto control = this->control();
> ```
>
> If I try to change it to RefPtr then it leads to build failures. If I don't
> then it compiles but crashes on following test:
>
> imported/blink/fast/forms/label/detached-document.html
While trying to find equivalent of "LocalFrame.h" header, it seems that Webkit has "Frame.h" 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.
EWS
Committed 263420@main (01527bde3937): <https://commits.webkit.org/263420@main>
Reviewed commits have been landed. Closing PR #12503 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/108566491>
WebKit Commit Bot
Re-opened since this is blocked by bug 259558
Alexey Proskuryakov
New tracking radar:
rdar://113011484
Ahmad Saleem
We might need to add following as well:
https://src.chromium.org/viewvc/blink?view=revision&revision=182131
and
https://src.chromium.org/viewvc/blink?view=revision&revision=185576
Ahmad Saleem
(In reply to Ahmad Saleem from comment #1)
> This to merge following Blink Commit -
>
> https://src.chromium.org/viewvc/blink?view=revision&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
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
Ahmad Saleem
(In reply to Ahmad Saleem from comment #9)
> (In reply to Ahmad Saleem from comment #1)
> > This to merge following Blink Commit -
> >
> > https://src.chromium.org/viewvc/blink?view=revision&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
>
> 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
https://github.com/chromium/chromium/commit/5db23fe6d7151affeaf8b84ac2b16cf1603c456d