Bug 100785 - focusin/focusout should support relatedTarget
Summary: focusin/focusout should support relatedTarget
Status: RESOLVED DUPLICATE of bug 76216
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Christian Biesinger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-30 13:47 PDT by Ojan Vafai
Modified: 2013-02-06 14:04 PST (History)
2 users (show)

See Also:


Attachments
Patch (9.10 KB, patch)
2013-01-29 15:58 PST, Christian Biesinger
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2012-10-30 13:47:25 PDT
Spec: http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-FocusEvent-relatedTarget.

IE9+ supports it.

I think we should support these on focus/blur as well. See http://lists.w3.org/Archives/Public/www-dom/2012OctDec/0061.html for the www-dom discussion.
Comment 1 Ojan Vafai 2012-10-31 13:08:10 PDT
I think this should be easy to add. All the logic is already in Document::setFocusedNode. The only tricky thing is that we need to add a FocusEvent.idl and fire FocusEvents instead of generic Events since they now need a relatedTarget property. FWIW, this also matches the way the events are specced.
Comment 2 Christian Biesinger 2013-01-29 15:58:26 PST
Created attachment 185329 [details]
Patch

Does this look reasonable? There's clearly work to be done (testing, more build systems, focus/blur events in addition to focusin/focusout), but does this look good otherwise?
Comment 3 Christian Biesinger 2013-02-06 14:04:50 PST

*** This bug has been marked as a duplicate of bug 76216 ***