WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
96734
Cannot select text within a label element that is linked to an input field
https://bugs.webkit.org/show_bug.cgi?id=96734
Summary
Cannot select text within a label element that is linked to an input field
ben
Reported
2012-09-14 01:27:48 PDT
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
Comment 1
2022-10-22 04:57:43 PDT
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
Comment 2
2022-10-29 17:43:39 PDT
(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
Comment 3
2022-12-02 16:08:25 PST
(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
Comment 4
2023-04-26 11:15:49 PDT
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
Comment 5
2023-04-26 11:16:24 PDT
<
rdar://problem/108566491
>
WebKit Commit Bot
Comment 6
2023-07-27 06:42:01 PDT
Re-opened since this is blocked by
bug 259558
Alexey Proskuryakov
Comment 7
2023-07-27 20:17:13 PDT
New tracking radar:
rdar://113011484
Ahmad Saleem
Comment 8
2023-10-03 14:42:46 PDT
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
Comment 9
2024-12-25 00:25:17 PST
(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
Comment 10
2024-12-25 00:27:21 PST
(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
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug