[Webkit-unassigned] [Bug 64160] Foward a non-bubbling event to related shadow host elements across relevant shadow scopes.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 8 09:31:24 PDT 2011


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





--- Comment #2 from Dimitri Glazkov (Google) <dglazkov at chromium.org>  2011-07-08 09:31:24 PST ---
(In reply to comment #0)
> Let me explain using the following example:
> 
> Document
>   Component-A
>     Component-B
>       Component-C
>       Component-D
>         Input-E (* new-focused-node)
>     Component-F
>       Input-G
>       Component-H
>         Input-I
>       Component-J
>         Input-K (* old-focused-node)
> 
> 'Component' here means a focusable shadow host element.
> Suppose that a focused node has just been changed from 'Input-K' to 'Input-E'. 
> 
> In this case, which components should receive a 'focus' event? Remember that a 'focus' event is a non-bubbling event.
> 
> It seems that XBL2 spec says a boundary element should receive a 'focus' event if a focusable element underneath get focused.
> - http://dev.w3.org/2006/xbl2/#the-focus-domfocusin-blur-and-domfocusou

Where exactly does it say that? Focus event doesn't bubble, but it still propagates through the ancestor chain during capture.

> 
> My initial rough idea is:
> 
>  * B and D (and Input-E) should receive a 'focus' event.

Why would B and D need to to get a focus event? Can you explain this a bit more? In my mind, only Input-E should be getting it.

>  * F and J (and Input-K) should receive a 'blur' event.

Similarly, only Input-K should be getting it.

>  * Each event should be fired as in a Event Target phase, which means:
>    - event.target is always same to the element itself.
>      e.g. A focus event listener on Component B will receive a event whose target is set to 'Component-B'.
>    - event.stopPropagation() doesn't take an effect. That doesn't make sense.
> 
> Although I use a 'focus' event as an example, I guess we can apply the same discussion to all non-bubbling events.

I don't understand why we need to re-fire non-bubbling events. Can you explain your thinking a bit more?

> Any opinion are welcome.
> 
> 
> I referred to these documents.
> - http://dev.w3.org/2006/xbl2/#event-handlers
> - http://wiki.whatwg.org/wiki/Component_Model_Use_Cases#Focus_and_Shadow_Subtrees
> - http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-htmlevents

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