[Webkit-unassigned] [Bug 86707] document.activeElement should not return a non-focusable element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 29 00:28:03 PDT 2012


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





--- Comment #16 from Arpita Bahuguna <arpitabahuguna at gmail.com>  2012-06-29 00:28:01 PST ---
(In reply to comment #15)
> (From update of attachment 149727 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=149727&action=review
> 
> > Source/WebCore/dom/Document.cpp:3763
> > +    if (newFocusedNode && newFocusedNode->isFocusable()) {
> 
> I'm not sure if it's safe to use only isFocusable().
> Do we need checks similar to Element::focus()?

The isFocusable() check on newFocusedNode seems appropriate the way it is in Document::setFocusedNode().

Plugin elements fail the supportsFocus() check (called from isFocusable()) since they do not have rareData set for them. Currently plugin elements are getting the focus since no "focusable" check was carried out in setFocusedNode().

Perhaps we should look at implementing supportsFocus() for Plugin elements as well, similar to say the HTMLMediaElement or HTMLFrameElementBase.

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