You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the component containing this is rendered and the user types in the input, only the "JSX: onKeyDown" is output to the console.
Placing this same input markup inside a React component will result in first the "JSX: onKeyDownCapture" and then the "JSX: onKeyDown" message being logged to the console.
It should be noted that adding a method to the component with a @Listen('keydown', { capture: true })does work as expected. It is only the bindings on elements within the JSX that is not working as expected.
Expected behavior:
Capture events bound on the HTML elements should fire as expected during the capture phase of the event.
Can this issue be reopened? When using onKeyDownCapture, I see an event listener is created on the element listening for keyDown event types. However, it never hits because the actual event type should be keydown (all lower case).
The linked PR only tests click capture events, so it's unclear if this is a regression or if this issue was never really resolved.
Stencil version:
I'm submitting a:
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior:
The following talks about a specific event, but the same applies to other events as well.
When
onKeyDownCapture
is bound on an HTML element in the JSX, it is never fired. For example:When the component containing this is rendered and the user types in the input, only the "JSX: onKeyDown" is output to the console.
Placing this same input markup inside a React component will result in first the "JSX: onKeyDownCapture" and then the "JSX: onKeyDown" message being logged to the console.
It should be noted that adding a method to the component with a
@Listen('keydown', { capture: true })
does work as expected. It is only the bindings on elements within the JSX that is not working as expected.Expected behavior:
Capture events bound on the HTML elements should fire as expected during the capture phase of the event.
Steps to reproduce:
Related code:
Key portion of demo: https://github.com/jcfranco/stencil-vdom-capture-listeners-not-firing/blob/master/src/components/my-component/my-component.tsx
The text was updated successfully, but these errors were encountered: