Expected behavior
I expect I can listen to focus and blur events that are dispatched by Lion's FocusMixin
Actual Behavior
The FocusMixin redispatches focus and blur events. However, the native events are dispatched using { composed: true }, which the FocusMixin doesn't do. That means Lion's focus and blur cannot be listened to on a parent web component:
<p>
<template shadowrootmode="open">
<lion-input placeholder="Lion input"></lion-input>
</template>
</p>
If I put a focus or blur listener on the <p>, the listener doesn't fire when focusing the <lion-input>. If I replace the <lion-input> to a regular <input>, the listener does fire.
Full reproduction: https://stackblitz.com/~/github.com/jessevanassen/lion-ui-focusmixin-redispatch-reproduction?file=index.html.
Only focus and blur events are fired by the <input>, not by the <lion-input>.
Expected behavior
I expect I can listen to
focusandblurevents that are dispatched by Lion's FocusMixinActual Behavior
The FocusMixin redispatches
focusandblurevents. However, the native events are dispatched using{ composed: true }, which the FocusMixin doesn't do. That means Lion'sfocusandblurcannot be listened to on a parent web component:If I put a
focusorblurlistener on the<p>, the listener doesn't fire when focusing the<lion-input>. If I replace the<lion-input>to a regular<input>, the listener does fire.Full reproduction: https://stackblitz.com/~/github.com/jessevanassen/lion-ui-focusmixin-redispatch-reproduction?file=index.html.
Only focus and blur events are fired by the
<input>, not by the<lion-input>.