[Webkit-unassigned] [Bug 40338] display:none element should not retain focus

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 15 09:57:50 PDT 2011


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


Vineet N Chaudhary <rgf748 at motorola.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #107039|0                           |1
        is obsolete|                            |




--- Comment #14 from Vineet N Chaudhary <rgf748 at motorola.com>  2011-09-15 09:57:50 PST ---
Created an attachment (id=107508)
 --> (https://bugs.webkit.org/attachment.cgi?id=107508&action=review)
Updated Patch

(In reply to comment #13)

> the word hidden makes me think of visibility: hidden.  Should we remove focus in that case as well?  If so, we need a test for that.

Yes actually word should be for display:none only, As for hidden elements renderers are not dropped.

> > +    // As HTMLAreaElement doesn't have renderer() we dont want to set focus to 0.
> Is this tested somewhere?
In LayoutTests/fast/events/mouse-focus-imagemap.html this test case AreaElement doesn't have renderer and hence we loose focus on image.

> "check the behavior" is too general.
> 
> Why do we need this line?
> 
> No curly brackets around a single line statement.

Done

> Why do we check that the node no longer retain focus by counting keydown event? It seems like we should directly check focused property.

I have modified layout test case again because even after setting display to none "document.activeElement" still remains HTMLTextAreaElement,
as we reset focus in performPostLayoutTasks() which is async call (called on timer). So that we should check the "activeElement" only after
performPostLayoutTasks() is called.

-- 
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