WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
43814
selectionStart clobbered if textarea isn't focused
https://bugs.webkit.org/show_bug.cgi?id=43814
Summary
selectionStart clobbered if textarea isn't focused
Ojan Vafai
Reported
2010-08-10 14:58:51 PDT
Created
attachment 64049
[details]
test case See test case. IE/Gecko/Opera don't clobber.
Attachments
test case
(400 bytes, text/html)
2010-08-10 14:58 PDT
,
Ojan Vafai
no flags
Details
Patch
(4.23 KB, patch)
2010-08-17 12:33 PDT
,
Ojan Vafai
tony
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ojan Vafai
Comment 1
2010-08-10 15:01:19 PDT
Also, if you call editArea.focus() before setting selectionEnd in the test case, then selectionStart doesn't get clobbered.
Ojan Vafai
Comment 2
2010-08-17 12:33:07 PDT
Created
attachment 64619
[details]
Patch
Tony Chang
Comment 3
2010-08-17 13:32:10 PDT
Comment on
attachment 64619
[details]
Patch
> diff --git a/LayoutTests/fast/forms/text-control-select-blurred.html b/LayoutTests/fast/forms/text-control-select-blurred.html
Nit: Can you add some text explaining what this is testing?
> diff --git a/WebCore/rendering/RenderTextControl.cpp b/WebCore/rendering/RenderTextControl.cpp > void RenderTextControl::setSelectionStart(int start) > { > - setSelectionRange(start, max(start, selectionEnd())); > + HTMLTextFormControlElement* element = static_cast<HTMLTextFormControlElement*> (node());
Nit: kill the space between > and (? I don't see any other static_casts with this space.
Ojan Vafai
Comment 4
2010-08-17 15:34:10 PDT
Committed
r65564
: <
http://trac.webkit.org/changeset/65564
>
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