Bug 69315

Summary: REGRESSION(r94274): setting input.value erroneously triggers focus event
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: FormsAssignee: Ryosuke Niwa <rniwa>
Severity: Normal CC: ap, darin, enrica, ojan, sullivan, tkent
Priority: P1 Keywords: GoogleBug
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 69395    
Description Flags
manual test
Patch tkent: review+

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.

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]
Comment 3 Kent Tamura 2011-10-03 23:22:03 PDT
Comment on attachment 109578 [details]

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]

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>