[Webkit-unassigned] [Bug 68513] <input> with autofocus doesn't lose focus when it has a certain onblur listener

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 21 03:04:20 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=68513





--- Comment #2 from Rakesh <rakesh.kn at motorola.com>  2011-09-21 03:04:20 PST ---
Created an attachment (id=108127)
 --> (https://bugs.webkit.org/attachment.cgi?id=108127&action=review)
Proposed Patch 

The script in this page tries to change the "type" of an input element which has an "autofocus" attribute set on onblur and onFocus events.
With change in "type" webcore detaches the node and adds the node again with modified type.
Issue:
The problem is we try to focus the Node if an "autofocus" attribute is set while attaching the node which causes the node to focus again.

Approach used in the patch:
We should autofocus an element only once after the page load. 
"The autofocus content attribute allows the author to indicate that a control is to be focused as soon as the page is loaded" from http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#autofocusing-a-form-control

I am using an autoFocused flag in Document which will set once the node has been focused for very first time.

Please let me know your comments or better approach to handle this.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list