Bug 69315 - REGRESSION(r94274): setting input.value erroneously triggers focus event
Summary: REGRESSION(r94274): setting input.value erroneously triggers focus event
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P1 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: GoogleBug
Depends on:
Blocks: 69395
  Show dependency treegraph
 
Reported: 2011-10-03 19:10 PDT by Ryosuke Niwa
Modified: 2011-10-04 20:34 PDT (History)
6 users (show)

See Also:


Attachments
manual test (1000 bytes, text/html)
2011-10-03 20:32 PDT, Ryosuke Niwa
no flags Details
Patch (3.99 KB, patch)
2011-10-03 20:38 PDT, Ryosuke Niwa
tkent: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2011-10-03 19:10:59 PDT
After http://trac.webkit.org/changeset/94274, WebKit sets focus on an input element when setting the value attribute of the element if the element has a selection in its inner text element.

http://b/issue?id=5362152
Comment 1 Ryosuke Niwa 2011-10-03 20:32:56 PDT
Created attachment 109577 [details]
manual test

I've spent last 1.5 hours trying to create a reproduction without a success.

It seems like I'd have to create a manual test here :(
Comment 2 Ryosuke Niwa 2011-10-03 20:38:31 PDT
Created attachment 109578 [details]
Patch
Comment 3 Kent Tamura 2011-10-03 23:22:03 PDT
Comment on attachment 109578 [details]
Patch

The change looks good, but why did r94274 make the problem?
Comment 4 Ryosuke Niwa 2011-10-03 23:40:22 PDT
(In reply to comment #3)
> (From update of attachment 109578 [details])
> The change looks good, but why did r94274 make the problem?

r94274 added a call to updateInnerTextValue in setValue. We used to update the inner text value in updateFromElement so this had never been an issue (although we may had a use-after-free back then).
Comment 5 Kent Tamura 2011-10-04 00:10:30 PDT
Comment on attachment 109578 [details]
Patch

ok, I understand.
Comment 6 Kent Tamura 2011-10-04 01:51:29 PDT
I have just remembered Bug 59071. I can remove the change for Bug 59071 when this patch is landed.
Comment 7 Ryosuke Niwa 2011-10-04 12:01:42 PDT
Committed r96628: <http://trac.webkit.org/changeset/96628>